Skip to content

Commit fa71d44

Browse files
committed
Make sure errorText set in decoration not ignored
1 parent 151b06c commit fa71d44

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/src/fields/form_builder_checkbox_group.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class FormBuilderCheckboxGroup<T> extends FormBuilderField<List<T>> {
5959
return InputDecorator(
6060
decoration: decoration.copyWith(
6161
enabled: !state.readOnly,
62-
errorText: field.errorText,
62+
errorText: decoration?.errorText ?? field.errorText,
6363
),
6464
child: GroupedCheckbox(
6565
orientation: orientation,

lib/src/fields/form_builder_checkbox_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FormBuilderCheckboxList<T> extends FormBuilderField<List<T>> {
7979
return InputDecorator(
8080
decoration: decoration.copyWith(
8181
enabled: !state.readOnly,
82-
errorText: field.errorText,
82+
errorText: decoration?.errorText ?? field.errorText,
8383
),
8484
child: Column(
8585
key: ObjectKey(state.value),

lib/src/fields/form_builder_dropdown.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class FormBuilderDropdown<T> extends FormBuilderField<T> {
7676
return InputDecorator(
7777
decoration: decoration.copyWith(
7878
enabled: !state.readOnly,
79-
errorText: field.errorText,
79+
errorText: decoration?.errorText ?? field.errorText,
8080
floatingLabelBehavior: hint == null
8181
? decoration.floatingLabelBehavior
8282
: FloatingLabelBehavior.always,

0 commit comments

Comments
 (0)