@@ -43,61 +43,7 @@ class CompleteFormState extends State<CompleteForm> {
43
43
skipDisabled: true ,
44
44
child: Column (
45
45
children: < Widget > [
46
- FormBuilderSearchableDropdown (
47
- name: 'searchable_dropdown' ,
48
- items: allCountries,
49
- onChanged: _onChanged,
50
- ),
51
46
const SizedBox (height: 15 ),
52
- FormBuilderChipsInput <Contact >(
53
- decoration: const InputDecoration (labelText: 'Chips' ),
54
- name: 'chips_test' ,
55
- onChanged: _onChanged,
56
- maxChips: 5 ,
57
- findSuggestions: (String query) {
58
- if (query.isNotEmpty) {
59
- var lowercaseQuery = query.toLowerCase ();
60
- return contacts.where ((profile) {
61
- return profile.name
62
- .toLowerCase ()
63
- .contains (query.toLowerCase ()) ||
64
- profile.email
65
- .toLowerCase ()
66
- .contains (query.toLowerCase ());
67
- }).toList (growable: false )
68
- ..sort ((a, b) => a.name
69
- .toLowerCase ()
70
- .indexOf (lowercaseQuery)
71
- .compareTo (b.name
72
- .toLowerCase ()
73
- .indexOf (lowercaseQuery)));
74
- } else {
75
- return const < Contact > [];
76
- }
77
- },
78
- chipBuilder: (context, state, profile) {
79
- return InputChip (
80
- key: ObjectKey (profile),
81
- label: Text (profile.name),
82
- avatar: CircleAvatar (
83
- backgroundImage: NetworkImage (profile.imageUrl),
84
- ),
85
- onDeleted: () => state.deleteChip (profile),
86
- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
87
- );
88
- },
89
- suggestionBuilder: (context, state, profile) {
90
- return ListTile (
91
- key: ObjectKey (profile),
92
- leading: CircleAvatar (
93
- backgroundImage: NetworkImage (profile.imageUrl),
94
- ),
95
- title: Text (profile.name),
96
- subtitle: Text (profile.email),
97
- onTap: () => state.selectSuggestion (profile),
98
- );
99
- },
100
- ),
101
47
FormBuilderSlider (
102
48
name: 'slider' ,
103
49
validator: FormBuilderValidators .compose ([
0 commit comments