Multi select changes
This commit is contained in:
parent
054ae5ad50
commit
f1e79d3e93
|
|
@ -57,11 +57,19 @@ class MultiSelectList extends StatefulWidget {
|
|||
|
||||
class MultiSelectListState extends State<MultiSelectList> {
|
||||
List<String> selected;
|
||||
ScrollController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
selected = widget.selected ?? widget.defaultSelected;
|
||||
_controller = ScrollController();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
String lookupOption(String value) {
|
||||
|
|
@ -135,6 +143,7 @@ class MultiSelectListState extends State<MultiSelectList> {
|
|||
SizedBox(height: 20),
|
||||
Expanded(
|
||||
child: ReorderableListView(
|
||||
scrollController: _controller,
|
||||
children: selected.asMap().entries.map((entry) {
|
||||
final option = entry.value;
|
||||
final columnTitle = state.company.getCustomFieldLabel(option);
|
||||
|
|
|
|||
66
pubspec.lock
66
pubspec.lock
|
|
@ -35,14 +35,14 @@ packages:
|
|||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.0-nullsafety.2"
|
||||
version: "2.5.0-nullsafety.3"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.2"
|
||||
version: "2.1.0-nullsafety.3"
|
||||
build:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -119,14 +119,14 @@ packages:
|
|||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.4"
|
||||
version: "1.1.0-nullsafety.5"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.2"
|
||||
version: "1.2.0-nullsafety.3"
|
||||
charts_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -147,7 +147,7 @@ packages:
|
|||
name: checked_yaml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.4"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -161,7 +161,7 @@ packages:
|
|||
name: clock
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.2"
|
||||
version: "1.1.0-nullsafety.3"
|
||||
code_builder:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -175,7 +175,7 @@ packages:
|
|||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.15.0-nullsafety.4"
|
||||
version: "1.15.0-nullsafety.5"
|
||||
contacts_service:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -259,7 +259,7 @@ packages:
|
|||
name: fake_async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.2"
|
||||
version: "1.2.0-nullsafety.3"
|
||||
faker:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -280,7 +280,7 @@ packages:
|
|||
name: file
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.0-nullsafety.3"
|
||||
version: "6.0.0-nullsafety.4"
|
||||
firebase:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -571,7 +571,7 @@ packages:
|
|||
name: js
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.3-nullsafety.2"
|
||||
version: "0.6.3-nullsafety.3"
|
||||
json_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -606,7 +606,7 @@ packages:
|
|||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.10-nullsafety.2"
|
||||
version: "0.12.10-nullsafety.3"
|
||||
material_design_icons_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -627,7 +627,7 @@ packages:
|
|||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.5"
|
||||
version: "1.3.0-nullsafety.6"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -704,7 +704,7 @@ packages:
|
|||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.2"
|
||||
version: "1.8.0-nullsafety.3"
|
||||
path_provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -746,7 +746,7 @@ packages:
|
|||
name: pedantic
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.10.0-nullsafety.2"
|
||||
version: "1.10.0-nullsafety.3"
|
||||
permission_handler:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -774,7 +774,7 @@ packages:
|
|||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0-nullsafety.3"
|
||||
version: "3.0.0-nullsafety.4"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -788,14 +788,14 @@ packages:
|
|||
name: pool
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.5.0-nullsafety.2"
|
||||
version: "1.5.0-nullsafety.3"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.0-nullsafety.3"
|
||||
version: "4.0.0-nullsafety.4"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -809,7 +809,7 @@ packages:
|
|||
name: pubspec_parse
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.5"
|
||||
version: "0.1.7"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -947,21 +947,21 @@ packages:
|
|||
name: source_map_stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.3"
|
||||
version: "2.1.0-nullsafety.4"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.10.10-nullsafety.2"
|
||||
version: "0.10.10-nullsafety.3"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.3"
|
||||
version: "1.8.0-nullsafety.4"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -982,14 +982,14 @@ packages:
|
|||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.10.0-nullsafety.5"
|
||||
version: "1.10.0-nullsafety.6"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.2"
|
||||
version: "2.1.0-nullsafety.3"
|
||||
stream_transform:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1003,7 +1003,7 @@ packages:
|
|||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.2"
|
||||
version: "1.1.0-nullsafety.3"
|
||||
sync_http:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1024,28 +1024,28 @@ packages:
|
|||
name: term_glyph
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.2"
|
||||
version: "1.2.0-nullsafety.3"
|
||||
test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.16.0-nullsafety.7"
|
||||
version: "1.16.0-nullsafety.13"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.19-nullsafety.4"
|
||||
version: "0.2.19-nullsafety.6"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.12-nullsafety.7"
|
||||
version: "0.3.12-nullsafety.12"
|
||||
timeago:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1059,14 +1059,14 @@ packages:
|
|||
name: timing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.1+2"
|
||||
version: "0.1.1+3"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.4"
|
||||
version: "1.3.0-nullsafety.5"
|
||||
url_launcher:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1136,7 +1136,7 @@ packages:
|
|||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.4"
|
||||
version: "2.1.0-nullsafety.5"
|
||||
version:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -1150,7 +1150,7 @@ packages:
|
|||
name: vm_service
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
version: "5.5.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -1215,5 +1215,5 @@ packages:
|
|||
source: hosted
|
||||
version: "2.2.1"
|
||||
sdks:
|
||||
dart: ">=2.11.0-0.0 <2.12.0"
|
||||
dart: ">=2.12.0-0.0 <3.0.0"
|
||||
flutter: ">=1.22.2 <2.0.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue