Skip to content

Commit 5259f24

Browse files
feat: use super params
1 parent 909013d commit 5259f24

File tree

1 file changed

+15
-26
lines changed

1 file changed

+15
-26
lines changed

lib/src/form_builder_image_picker.dart

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,22 @@ class FormBuilderImagePicker extends FormBuilderField<List<dynamic>> {
112112
FutureVoidCallBack cameraPicker, FutureVoidCallBack galleryPicker)?
113113
optionsBuilder;
114114

115+
final WidgetBuilder? loadingWidget;
116+
115117
FormBuilderImagePicker({
116-
Key? key,
117-
//From Super
118-
required String name,
119-
FormFieldValidator<List<dynamic>>? validator,
120-
List<dynamic>? initialValue,
121-
InputDecoration decoration = const InputDecoration(),
122-
ValueChanged<List<dynamic>?>? onChanged,
123-
ValueTransformer<List<dynamic>?>? valueTransformer,
124-
bool enabled = true,
125-
FormFieldSetter<List<dynamic>>? onSaved,
126-
AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
127-
VoidCallback? onReset,
128-
FocusNode? focusNode,
129-
WidgetBuilder? loadingWidget,
118+
super.key,
119+
required super.name,
120+
super.validator,
121+
super.initialValue,
122+
super.decoration = const InputDecoration(),
123+
super.onChanged,
124+
super.valueTransformer,
125+
super.enabled = true,
126+
super.onSaved,
127+
super.autovalidateMode = AutovalidateMode.disabled,
128+
super.onReset,
129+
super.focusNode,
130+
this.loadingWidget,
130131
this.transformImageWidget,
131132
this.showDecoration = true,
132133
this.placeholderWidget,
@@ -160,18 +161,6 @@ class FormBuilderImagePicker extends FormBuilderField<List<dynamic>> {
160161
],
161162
}) : assert(maxImages == null || maxImages >= 0),
162163
super(
163-
key: key,
164-
initialValue: initialValue,
165-
name: name,
166-
validator: validator,
167-
valueTransformer: valueTransformer,
168-
onChanged: onChanged,
169-
autovalidateMode: autovalidateMode,
170-
onSaved: onSaved,
171-
enabled: enabled,
172-
onReset: onReset,
173-
decoration: decoration,
174-
focusNode: focusNode,
175164
builder: (FormFieldState<List<dynamic>?> field) {
176165
final state = field as FormBuilderImagePickerState;
177166
final theme = Theme.of(state.context);

0 commit comments

Comments
 (0)