Commit cdf666ea by Rizal Hermawan

fix bugs on MultiSelectBottomSheetField

parent c67cf507
......@@ -96,7 +96,7 @@ class MultiSelectChipDisplay<V> extends StatelessWidget {
height: height ?? MediaQuery.of(context).size.height * 0.08,
child: scrollBar != null
? Scrollbar(
isAlwaysShown: scrollBar!.isAlwaysShown,
thumbVisibility: scrollBar!.isAlwaysShown,
controller: _scrollController,
child: ListView.builder(
controller: _scrollController,
......
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import '../multi_select_flutter.dart';
class MultiSelectChipField<V> extends FormField<List<V>> {
......@@ -270,7 +269,7 @@ class __MultiSelectChipFieldViewState<V>
_selectedValues.addAll(widget.initialValue!);
}
if (widget.scrollControl != null && widget.scroll)
WidgetsBinding.instance!.addPostFrameCallback((_) => _scrollToPosition());
WidgetsBinding.instance.addPostFrameCallback((_) => _scrollToPosition());
}
_scrollToPosition() {
......@@ -379,7 +378,7 @@ class __MultiSelectChipFieldViewState<V>
MediaQuery.of(context).size.height * 0.08,
child: widget.scrollBar != null
? Scrollbar(
isAlwaysShown:
thumbVisibility:
widget.scrollBar!.isAlwaysShown,
controller: _scrollController,
child: ListView.builder(
......
......@@ -22,9 +22,7 @@ class MultiSelectActions<V> {
/// Calls the onConfirm function if one was provided.
void onConfirmTap(
BuildContext ctx, List<V> selectedValues, Function(List<V>)? onConfirm, int validationSelectedLength) {
if (selectedValues.length <= validationSelectedLength) {
Navigator.pop(ctx, selectedValues);
}
if (onConfirm != null) {
onConfirm(selectedValues);
}
......
......@@ -8,11 +8,7 @@ packages:
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
<<<<<<< HEAD
version: "2.11.0"
=======
version: "2.5.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
boolean_selector:
dependency: transitive
description:
......@@ -28,18 +24,7 @@ packages:
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
<<<<<<< HEAD
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:
dependency: transitive
description:
......@@ -97,11 +82,7 @@ packages:
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
<<<<<<< HEAD
version: "1.10.0"
=======
version: "1.3.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
path:
dependency: transitive
description:
......@@ -122,11 +103,7 @@ packages:
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
<<<<<<< HEAD
version: "1.10.0"
=======
version: "1.8.0"
>>>>>>> parent of a863bcb (update gradle distribution url and remove validation length in action function)
stack_trace:
dependency: transitive
description:
......@@ -166,18 +143,7 @@ packages:
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
<<<<<<< HEAD
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:
dependency: transitive
description:
......@@ -195,4 +161,4 @@ packages:
source: hosted
version: "0.3.0"
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
homepage: https://github.com/CHB61/flutter-multi-select
environment:
sdk: '>=3.2.0 <4.0.0'
sdk: '>=2.12.0 <3.0.0'
dependencies:
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