Commit cdf666ea by Rizal Hermawan

fix bugs on MultiSelectBottomSheetField

parent c67cf507
...@@ -96,7 +96,7 @@ class MultiSelectChipDisplay<V> extends StatelessWidget { ...@@ -96,7 +96,7 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
height: height ?? MediaQuery.of(context).size.height * 0.08, height: height ?? MediaQuery.of(context).size.height * 0.08,
child: scrollBar != null child: scrollBar != null
? Scrollbar( ? Scrollbar(
isAlwaysShown: scrollBar!.isAlwaysShown, thumbVisibility: scrollBar!.isAlwaysShown,
controller: _scrollController, controller: _scrollController,
child: ListView.builder( child: ListView.builder(
controller: _scrollController, controller: _scrollController,
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import '../multi_select_flutter.dart'; import '../multi_select_flutter.dart';
class MultiSelectChipField<V> extends FormField<List<V>> { class MultiSelectChipField<V> extends FormField<List<V>> {
...@@ -270,7 +269,7 @@ class __MultiSelectChipFieldViewState<V> ...@@ -270,7 +269,7 @@ class __MultiSelectChipFieldViewState<V>
_selectedValues.addAll(widget.initialValue!); _selectedValues.addAll(widget.initialValue!);
} }
if (widget.scrollControl != null && widget.scroll) if (widget.scrollControl != null && widget.scroll)
WidgetsBinding.instance!.addPostFrameCallback((_) => _scrollToPosition()); WidgetsBinding.instance.addPostFrameCallback((_) => _scrollToPosition());
} }
_scrollToPosition() { _scrollToPosition() {
...@@ -379,7 +378,7 @@ class __MultiSelectChipFieldViewState<V> ...@@ -379,7 +378,7 @@ class __MultiSelectChipFieldViewState<V>
MediaQuery.of(context).size.height * 0.08, MediaQuery.of(context).size.height * 0.08,
child: widget.scrollBar != null child: widget.scrollBar != null
? Scrollbar( ? Scrollbar(
isAlwaysShown: thumbVisibility:
widget.scrollBar!.isAlwaysShown, widget.scrollBar!.isAlwaysShown,
controller: _scrollController, controller: _scrollController,
child: ListView.builder( child: ListView.builder(
......
...@@ -22,9 +22,7 @@ class MultiSelectActions<V> { ...@@ -22,9 +22,7 @@ class MultiSelectActions<V> {
/// Calls the onConfirm function if one was provided. /// Calls the onConfirm function if one was provided.
void onConfirmTap( void onConfirmTap(
BuildContext ctx, List<V> selectedValues, Function(List<V>)? onConfirm, int validationSelectedLength) { BuildContext ctx, List<V> selectedValues, Function(List<V>)? onConfirm, int validationSelectedLength) {
if (selectedValues.length <= validationSelectedLength) {
Navigator.pop(ctx, selectedValues); Navigator.pop(ctx, selectedValues);
}
if (onConfirm != null) { if (onConfirm != null) {
onConfirm(selectedValues); onConfirm(selectedValues);
} }
......
...@@ -8,11 +8,7 @@ packages: ...@@ -8,11 +8,7 @@ packages:
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
<<<<<<< HEAD
version: "2.11.0" version: "2.11.0"
=======
version: "2.5.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
...@@ -28,18 +24,7 @@ packages: ...@@ -28,18 +24,7 @@ packages:
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
<<<<<<< HEAD
version: "1.3.0" version: "1.3.0"
=======
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
clock: clock:
dependency: transitive dependency: transitive
description: description:
...@@ -97,11 +82,7 @@ packages: ...@@ -97,11 +82,7 @@ packages:
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
<<<<<<< HEAD
version: "1.10.0" version: "1.10.0"
=======
version: "1.3.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
path: path:
dependency: transitive dependency: transitive
description: description:
...@@ -122,11 +103,7 @@ packages: ...@@ -122,11 +103,7 @@ packages:
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
<<<<<<< HEAD
version: "1.10.0" version: "1.10.0"
=======
version: "1.8.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
...@@ -166,18 +143,7 @@ packages: ...@@ -166,18 +143,7 @@ packages:
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
<<<<<<< HEAD
version: "0.6.1" version: "0.6.1"
=======
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
...@@ -195,4 +161,4 @@ packages: ...@@ -195,4 +161,4 @@ packages:
source: hosted source: hosted
version: "0.3.0" version: "0.3.0"
sdks: sdks:
dart: ">=3.2.0 <4.0.0" dart: ">=3.2.0-194.0.dev <4.0.0"
...@@ -7,7 +7,7 @@ documentation: https://github.com/CHB61/flutter-multi-select ...@@ -7,7 +7,7 @@ documentation: https://github.com/CHB61/flutter-multi-select
homepage: https://github.com/CHB61/flutter-multi-select homepage: https://github.com/CHB61/flutter-multi-select
environment: environment:
sdk: '>=3.2.0 <4.0.0' sdk: '>=2.12.0 <3.0.0'
dependencies: dependencies:
flutter: flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment