Skip to content

Commit b331262

Browse files
authored
Merge pull request #10 from SandorMLeyva/main
Allow initialData with Uint8List to mobile apps
2 parents 6b78d17 + e3b3c3c commit b331262

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/form_builder_image_picker.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ class FormBuilderImagePicker extends FormBuilderField<List<dynamic>> {
113113
width: previewWidth,
114114
height: previewHeight,
115115
margin: previewMargin,
116-
child: kIsWeb
117-
? Image.memory(item as Uint8List,
118-
fit: BoxFit.cover)
116+
child: item is Uint8List
117+
? Image.memory(item, fit: BoxFit.cover)
119118
: item is String
120119
? Image.network(item, fit: BoxFit.cover)
121120
: Image.file(item as File,

0 commit comments

Comments
 (0)