@@ -47,7 +47,7 @@ class CompleteFormState extends State<CompleteForm> {
47
47
child: Column (
48
48
children: < Widget > [
49
49
FormBuilderFilterChip (
50
- attribute : 'filter_chip' ,
50
+ name : 'filter_chip' ,
51
51
decoration: InputDecoration (
52
52
labelText: 'Select many options' ,
53
53
),
@@ -65,7 +65,7 @@ class CompleteFormState extends State<CompleteForm> {
65
65
],
66
66
),
67
67
FormBuilderChoiceChip (
68
- attribute : 'choice_chip' ,
68
+ name : 'choice_chip' ,
69
69
decoration: InputDecoration (
70
70
labelText: 'Select an option' ,
71
71
),
@@ -83,14 +83,14 @@ class CompleteFormState extends State<CompleteForm> {
83
83
],
84
84
),
85
85
FormBuilderColorPickerField (
86
- attribute : 'color_picker' ,
86
+ name : 'color_picker' ,
87
87
// initialValue: Colors.yellow,
88
88
colorPickerType: ColorPickerType .MaterialPicker ,
89
89
decoration: InputDecoration (labelText: 'Pick Color' ),
90
90
),
91
91
FormBuilderChipsInput (
92
92
decoration: InputDecoration (labelText: 'Chips' ),
93
- attribute : 'chips_test' ,
93
+ name : 'chips_test' ,
94
94
onChanged: _onChanged,
95
95
initialValue: [
96
96
Contact (
'Andrew' ,
'[email protected] ' ,
@@ -142,7 +142,7 @@ class CompleteFormState extends State<CompleteForm> {
142
142
},
143
143
),
144
144
FormBuilderDateTimePicker (
145
- attribute : 'date' ,
145
+ name : 'date' ,
146
146
inputType: InputType .time,
147
147
decoration: InputDecoration (
148
148
labelText: 'Appointment Time' ,
@@ -151,7 +151,7 @@ class CompleteFormState extends State<CompleteForm> {
151
151
pickerType: PickerType .cupertino,
152
152
),
153
153
FormBuilderDateRangePicker (
154
- attribute : 'date_range' ,
154
+ name : 'date_range' ,
155
155
firstDate: DateTime (1970 ),
156
156
lastDate: DateTime (2030 ),
157
157
format: DateFormat ('yyyy-MM-dd' ),
@@ -163,7 +163,7 @@ class CompleteFormState extends State<CompleteForm> {
163
163
),
164
164
),
165
165
FormBuilderSlider (
166
- attribute : 'slider' ,
166
+ name : 'slider' ,
167
167
validator: FormBuilderValidators .compose ([
168
168
FormBuilderValidators .min (context, 6 ),
169
169
]),
@@ -179,7 +179,7 @@ class CompleteFormState extends State<CompleteForm> {
179
179
),
180
180
),
181
181
FormBuilderRangeSlider (
182
- attribute : 'range_slider' ,
182
+ name : 'range_slider' ,
183
183
validator: FormBuilderValidators .compose (
184
184
[FormBuilderValidators .min (context, 6 )]),
185
185
onChanged: _onChanged,
@@ -194,7 +194,7 @@ class CompleteFormState extends State<CompleteForm> {
194
194
),
195
195
),
196
196
FormBuilderCheckbox (
197
- attribute : 'accept_terms' ,
197
+ name : 'accept_terms' ,
198
198
initialValue: false ,
199
199
onChanged: _onChanged,
200
200
title: RichText (
@@ -226,7 +226,7 @@ class CompleteFormState extends State<CompleteForm> {
226
226
FormBuilderTextField (
227
227
key: _ageKey,
228
228
autovalidate: true ,
229
- attribute : 'age' ,
229
+ name : 'age' ,
230
230
decoration: InputDecoration (
231
231
labelText: 'Age' ,
232
232
suffixIcon: _ageHasError
@@ -253,7 +253,7 @@ class CompleteFormState extends State<CompleteForm> {
253
253
FormBuilderDropdown (
254
254
key: _genderKey,
255
255
// autovalidate: true,
256
- attribute : 'gender' ,
256
+ name : 'gender' ,
257
257
decoration: InputDecoration (
258
258
labelText: 'Gender' ,
259
259
suffix: _genderHasError
@@ -283,7 +283,7 @@ class CompleteFormState extends State<CompleteForm> {
283
283
decoration: InputDecoration (
284
284
labelText: 'Country' ,
285
285
),
286
- attribute : 'country' ,
286
+ name : 'country' ,
287
287
onChanged: _onChanged,
288
288
itemBuilder: (context, country) {
289
289
return ListTile (
@@ -312,7 +312,7 @@ class CompleteFormState extends State<CompleteForm> {
312
312
decoration: InputDecoration (
313
313
labelText: 'My chosen language' ,
314
314
),
315
- attribute : 'best_language' ,
315
+ name : 'best_language' ,
316
316
onChanged: _onChanged,
317
317
validator: FormBuilderValidators .compose (
318
318
[FormBuilderValidators .required (context)]),
@@ -327,7 +327,7 @@ class CompleteFormState extends State<CompleteForm> {
327
327
FormBuilderSegmentedControl (
328
328
decoration:
329
329
InputDecoration (labelText: 'Movie Rating (Archer)' ),
330
- attribute : 'movie_rating' ,
330
+ name : 'movie_rating' ,
331
331
// initialValue: 1,
332
332
// textStyle: TextStyle(fontWeight: FontWeight.bold),
333
333
options: List .generate (5 , (i) => i + 1 )
@@ -343,13 +343,13 @@ class CompleteFormState extends State<CompleteForm> {
343
343
),
344
344
FormBuilderSwitch (
345
345
title: Text ('I Accept the tems and conditions' ),
346
- attribute : 'accept_terms_switch' ,
346
+ name : 'accept_terms_switch' ,
347
347
initialValue: true ,
348
348
onChanged: _onChanged,
349
349
),
350
350
FormBuilderTouchSpin (
351
- decoration: InputDecoration (labelText: 'Stepper ' ),
352
- attribute : 'stepper ' ,
351
+ decoration: InputDecoration (labelText: 'TouchSpin ' ),
352
+ name : 'touch_spin ' ,
353
353
initialValue: 10 ,
354
354
step: 1 ,
355
355
iconSize: 48.0 ,
@@ -358,7 +358,7 @@ class CompleteFormState extends State<CompleteForm> {
358
358
),
359
359
FormBuilderRating (
360
360
decoration: InputDecoration (labelText: 'Rate this form' ),
361
- attribute : 'rate' ,
361
+ name : 'rate' ,
362
362
iconSize: 32.0 ,
363
363
initialValue: 1.0 ,
364
364
max: 5.0 ,
@@ -367,7 +367,7 @@ class CompleteFormState extends State<CompleteForm> {
367
367
FormBuilderCheckboxGroup (
368
368
decoration:
369
369
InputDecoration (labelText: 'The language of my people' ),
370
- attribute : 'languages' ,
370
+ name : 'languages' ,
371
371
initialValue: ['Dart' ],
372
372
options: [
373
373
FormBuilderFieldOption (value: 'Dart' ),
@@ -388,19 +388,19 @@ class CompleteFormState extends State<CompleteForm> {
388
388
labelText: 'Signature' ,
389
389
border: OutlineInputBorder (),
390
390
),
391
- attribute : 'signature' ,
391
+ name : 'signature' ,
392
392
border: Border .all (color: Colors .green),
393
393
onChanged: _onChanged,
394
394
),
395
395
FormBuilderImagePicker (
396
- attribute : 'photos' ,
396
+ name : 'photos' ,
397
397
decoration: InputDecoration (labelText: 'Pick Photos' ),
398
398
maxImages: 1 ,
399
399
),
400
400
SizedBox (height: 15 ),
401
401
FormBuilderCountryPicker (
402
402
initialValue: 'Germany' ,
403
- attribute : 'country' ,
403
+ name : 'country' ,
404
404
decoration: InputDecoration (
405
405
border: OutlineInputBorder (), labelText: 'Country' ),
406
406
validator: FormBuilderValidators .compose ([
@@ -410,7 +410,7 @@ class CompleteFormState extends State<CompleteForm> {
410
410
),
411
411
SizedBox (height: 15 ),
412
412
FormBuilderPhoneField (
413
- attribute : 'phone_number' ,
413
+ name : 'phone_number' ,
414
414
initialValue: '+254' ,
415
415
// defaultSelectedCountryIsoCode: 'KE',
416
416
cursorColor: Colors .black,
@@ -431,7 +431,7 @@ class CompleteFormState extends State<CompleteForm> {
431
431
/*SizedBox(height: 15),
432
432
FormBuilderSignaturePad(
433
433
decoration: InputDecoration(labelText: 'Signature'),
434
- attribute : 'signature',
434
+ name : 'signature',
435
435
// height: 250,
436
436
clearButtonText: 'Start Over',
437
437
onChanged: _onChanged,
0 commit comments