@@ -127,6 +127,7 @@ class _FormBuilderState extends State<FormBuilder> {
127
127
: null ,
128
128
decoration: InputDecoration (
129
129
labelText: formControl.label,
130
+ enabled: ! (widget.readonly || formControl.readonly),
130
131
hintText: formControl.hint,
131
132
helperText: formControl.hint,
132
133
),
@@ -214,6 +215,7 @@ class _FormBuilderState extends State<FormBuilder> {
214
215
: null ,
215
216
decoration: InputDecoration (
216
217
labelText: formControl.label,
218
+ enabled: ! (widget.readonly || formControl.readonly),
217
219
hintText: formControl.hint,
218
220
),
219
221
),
@@ -253,6 +255,7 @@ class _FormBuilderState extends State<FormBuilder> {
253
255
return InputDecorator (
254
256
decoration: InputDecoration (
255
257
labelText: formControl.label,
258
+ enabled: ! (widget.readonly || formControl.readonly),
256
259
helperText: formControl.hint,
257
260
errorText: field.errorText,
258
261
contentPadding: EdgeInsets .only (top: 10.0 , bottom: 0.0 ),
@@ -324,6 +327,7 @@ class _FormBuilderState extends State<FormBuilder> {
324
327
return InputDecorator (
325
328
decoration: InputDecoration (
326
329
labelText: formControl.label,
330
+ enabled: ! (widget.readonly || formControl.readonly),
327
331
helperText: formControl.hint ?? "" ,
328
332
errorText: field.errorText,
329
333
contentPadding: EdgeInsets .only (top: 10.0 , bottom: 0.0 ),
@@ -355,6 +359,7 @@ class _FormBuilderState extends State<FormBuilder> {
355
359
return InputDecorator (
356
360
decoration: InputDecoration (
357
361
labelText: formControl.label,
362
+ enabled: ! (widget.readonly || formControl.readonly),
358
363
helperText: formControl.hint,
359
364
errorText: field.errorText,
360
365
contentPadding: EdgeInsets .only (top: 10.0 , bottom: 10.0 ),
@@ -406,6 +411,7 @@ class _FormBuilderState extends State<FormBuilder> {
406
411
return InputDecorator (
407
412
decoration: InputDecoration (
408
413
// labelText: formControl.label,
414
+ enabled: ! (widget.readonly || formControl.readonly),
409
415
helperText: formControl.hint ?? "" ,
410
416
errorText: field.errorText,
411
417
),
@@ -450,6 +456,7 @@ class _FormBuilderState extends State<FormBuilder> {
450
456
return InputDecorator (
451
457
decoration: InputDecoration (
452
458
labelText: formControl.label,
459
+ enabled: ! (widget.readonly || formControl.readonly),
453
460
helperText: formControl.hint ?? "" ,
454
461
errorText: field.errorText,
455
462
),
@@ -486,6 +493,7 @@ class _FormBuilderState extends State<FormBuilder> {
486
493
return InputDecorator (
487
494
decoration: InputDecoration (
488
495
labelText: formControl.label,
496
+ enabled: ! (widget.readonly || formControl.readonly),
489
497
helperText: formControl.hint ?? "" ,
490
498
errorText: field.errorText,
491
499
),
@@ -521,6 +529,7 @@ class _FormBuilderState extends State<FormBuilder> {
521
529
return InputDecorator (
522
530
decoration: InputDecoration (
523
531
// labelText: formControl.label,
532
+ enabled: ! (widget.readonly || formControl.readonly),
524
533
helperText: formControl.hint ?? "" ,
525
534
errorText: field.errorText,
526
535
),
@@ -566,6 +575,7 @@ class _FormBuilderState extends State<FormBuilder> {
566
575
return InputDecorator (
567
576
decoration: InputDecoration (
568
577
labelText: formControl.label,
578
+ enabled: ! (widget.readonly || formControl.readonly),
569
579
helperText: formControl.hint,
570
580
errorText: field.errorText,
571
581
),
@@ -655,6 +665,7 @@ class _FormBuilderState extends State<FormBuilder> {
655
665
return InputDecorator (
656
666
decoration: InputDecoration (
657
667
labelText: formControl.label,
668
+ enabled: ! (widget.readonly || formControl.readonly),
658
669
helperText: formControl.hint ?? "" ,
659
670
errorText: field.errorText,
660
671
contentPadding: EdgeInsets .only (top: 10.0 , bottom: 0.0 ),
@@ -687,6 +698,7 @@ class _FormBuilderState extends State<FormBuilder> {
687
698
initialValue: field.value,
688
699
decoration: InputDecoration (
689
700
// prefixIcon: Icon(Icons.search),
701
+ enabled: ! (widget.readonly || formControl.readonly),
690
702
hintText: formControl.hint,
691
703
labelText: formControl.label,
692
704
errorText: field.errorText,
@@ -789,6 +801,7 @@ class _FormBuilderState extends State<FormBuilder> {
789
801
controller: _inputController,
790
802
decoration: InputDecoration (
791
803
labelText: formControl.label,
804
+ enabled: ! (formWidget.readonly || formControl.readonly),
792
805
hintText: formControl.hint ?? "" ,
793
806
),
794
807
onSaved: (value) {
@@ -839,6 +852,7 @@ class _FormBuilderState extends State<FormBuilder> {
839
852
},
840
853
decoration: InputDecoration (
841
854
labelText: formControl.label,
855
+ enabled: ! (formWidget.readonly || formControl.readonly),
842
856
hintText: formControl.hint ?? "" ,
843
857
),
844
858
onSaved: (value) {
0 commit comments