Skip to content

Commit 01ec8bb

Browse files
Merge pull request #1261 from flutter-form-builder-ecosystem/fix-1259-disabled-fields
fix: improve disabled decoration field form
2 parents 96eb532 + c1fd0ac commit 01ec8bb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/src/form_builder_field_decoration.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import 'package:flutter/material.dart';
22

33
import 'package:flutter_form_builder/flutter_form_builder.dart';
44

5+
/// Extends [FormBuilderField] and add a `decoration` (InputDecoration) property
6+
///
7+
/// This class override `decoration.enable` with [enable] value
58
class FormBuilderFieldDecoration<T> extends FormBuilderField<T> {
69
const FormBuilderFieldDecoration({
710
super.key,
@@ -36,7 +39,7 @@ class FormBuilderFieldDecorationState<F extends FormBuilderFieldDecoration<T>,
3639
errorText: widget.enabled || readOnly
3740
? widget.decoration.errorText ?? errorText
3841
: null,
39-
enabled: widget.enabled || readOnly,
42+
enabled: widget.enabled,
4043
);
4144

4245
@override

0 commit comments

Comments
 (0)