Skip to content

Commit 0872c7e

Browse files
authored
Merge pull request #554 from awhitford/field_breaks
Fixed initState for File Picker and Location fields
2 parents a1ffcd2 + edf8197 commit 0872c7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/fields/form_builder_file_picker.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ class _FormBuilderFilePickerState
139139

140140
@override
141141
void initState() {
142-
_files = widget.initialValue ?? [];
143142
super.initState();
143+
_files = widget.initialValue ?? [];
144144
}
145145

146146
Future<void> pickFiles(FormFieldState<List<PlatformFile>> field) async {

lib/src/widgets/location_field_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ class _LocationFieldDialogState extends State<LocationFieldDialog> {
8686

8787
@override
8888
void initState() {
89+
super.initState();
8990
_initialCameraPosition = widget.initialCameraPosition ??
9091
CameraPosition(
9192
target: LatLng(37.42796133580664, -122.085749655962),
9293
zoom: 14.4746,
9394
);
9495
_value = _initialCameraPosition;
95-
super.initState();
9696
}
9797

9898
@override

0 commit comments

Comments
 (0)