Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit b1a2bd7

Browse files
committed
[image_picker] Change image_picker's retrieveLostData() example to a simple one
1 parent db2f8fc commit b1a2bd7

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/image_picker/image_picker/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,10 @@ Future<void> getLostData() async {
6262
if (response.isEmpty) {
6363
return;
6464
}
65-
if (response.file != null) {
66-
if (response.files.length >= 2 ) {
67-
_imageFileList = response.files
68-
} else {
69-
setState(() {
70-
if (response.type == RetrieveType.video) {
71-
_handleVideo(response.file);
72-
} else {
73-
_handleImage(response.file);
74-
}
75-
}});
65+
if (response.files != null) {
66+
for(final XFile file in response.files) {
67+
_handleFile(file);
68+
}
7669
} else {
7770
_handleError(response.exception);
7871
}

0 commit comments

Comments
 (0)