@@ -93,54 +93,6 @@ class MyHomePageState extends State<MyHomePage> {
93
93
colorPickerType: ColorPickerType .materialPicker,
94
94
decoration: const InputDecoration (labelText: 'Color Picker' ),
95
95
),
96
- FormBuilderChipsInput <Contact >(
97
- decoration: const InputDecoration (labelText: 'Chips Input' ),
98
- name: 'chips_test' ,
99
- onChanged: _onChanged,
100
- maxChips: 5 ,
101
- findSuggestions: (String query) {
102
- if (query.isNotEmpty) {
103
- var lowercaseQuery = query.toLowerCase ();
104
- return contacts.where ((profile) {
105
- return profile.name
106
- .toLowerCase ()
107
- .contains (query.toLowerCase ()) ||
108
- profile.email
109
- .toLowerCase ()
110
- .contains (query.toLowerCase ());
111
- }).toList (growable: false )
112
- ..sort ((a, b) => a.name
113
- .toLowerCase ()
114
- .indexOf (lowercaseQuery)
115
- .compareTo (
116
- b.name.toLowerCase ().indexOf (lowercaseQuery)));
117
- } else {
118
- return const < Contact > [];
119
- }
120
- },
121
- chipBuilder: (context, state, profile) {
122
- return InputChip (
123
- key: ObjectKey (profile),
124
- label: Text (profile.name),
125
- avatar: CircleAvatar (
126
- backgroundImage: NetworkImage (profile.imageUrl),
127
- ),
128
- onDeleted: () => state.deleteChip (profile),
129
- materialTapTargetSize: MaterialTapTargetSize .shrinkWrap,
130
- );
131
- },
132
- suggestionBuilder: (context, state, profile) {
133
- return ListTile (
134
- key: ObjectKey (profile),
135
- leading: CircleAvatar (
136
- backgroundImage: NetworkImage (profile.imageUrl),
137
- ),
138
- title: Text (profile.name),
139
- subtitle: Text (profile.email),
140
- onTap: () => state.selectSuggestion (profile),
141
- );
142
- },
143
- ),
144
96
FormBuilderCupertinoDateTimePicker (
145
97
name: 'date_time' ,
146
98
initialValue: DateTime .now (),
0 commit comments