From dc679112997b6384cd673a6baf4a1a57ba124c5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Thu, 9 Jan 2025 10:41:17 +0100
Subject: [PATCH] Default use Column instead of ListView in parameters list to
 avoid update issue

---
 CHANGELOG.md                                      |  4 ++++
 lib/parameters/application_config_definition.dart |  2 ++
 lib/parameters/pages/parameters.dart              | 10 +++++++---
 pubspec.yaml                                      |  2 +-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca39af5..9c20b08 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.9.1
+
+-   Default use Column instead of ListView in parameters list to avoid update issue
+
 ## 0.9.0
 
 -   Add GNU GENERAL PUBLIC LICENSE
diff --git a/lib/parameters/application_config_definition.dart b/lib/parameters/application_config_definition.dart
index 7b2a5bb..a70fa05 100644
--- a/lib/parameters/application_config_definition.dart
+++ b/lib/parameters/application_config_definition.dart
@@ -5,6 +5,7 @@ import 'package:flutter_custom_toolbox/flutter_toolbox.dart';
 class ApplicationConfigDefinition {
   final String appTitle;
   final List<ApplicationSettingsParameter> activitySettings;
+  final bool allowScrollParametersList;
   final bool autoStartActivity;
   final void Function(BuildContext context) startNewActivity;
   final void Function(BuildContext context) quitCurrentActivity;
@@ -15,6 +16,7 @@ class ApplicationConfigDefinition {
   const ApplicationConfigDefinition({
     required this.appTitle,
     required this.activitySettings,
+    this.allowScrollParametersList = false,
     this.autoStartActivity = false,
     required this.startNewActivity,
     required this.quitCurrentActivity,
diff --git a/lib/parameters/pages/parameters.dart b/lib/parameters/pages/parameters.dart
index 5586e67..d07ef92 100644
--- a/lib/parameters/pages/parameters.dart
+++ b/lib/parameters/pages/parameters.dart
@@ -89,9 +89,13 @@ class PageParameters extends StatelessWidget {
     // Global blocks list
     final List<Widget> blocks = [
       Expanded(
-        child: ListView(
-          children: blockTop,
-        ),
+        child: appConfig.allowScrollParametersList
+            ? ListView(
+                children: blockTop,
+              )
+            : Column(
+                children: blockTop,
+              ),
       ),
       SizedBox(height: separatorHeight),
     ];
diff --git a/pubspec.yaml b/pubspec.yaml
index ba9d857..313c9c6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@ description: "Flutter custom toolbox for org.benoitharrault.* projects."
 
 publish_to: "none"
 
-version: 0.9.0
+version: 0.9.1
 
 homepage: https://git.harrault.fr/android/flutter-toolbox
 
-- 
GitLab