diff --git a/lib/upload_image/upload_image.dart b/lib/upload_image/upload_image.dart index a201847..17b0fd8 100644 --- a/lib/upload_image/upload_image.dart +++ b/lib/upload_image/upload_image.dart @@ -329,7 +329,7 @@ class _UploadImagesState extends State { int number = (widget.max ?? 9) - imagesList.length; List list = []; List? images = await ImagePicker().pickMultiImage( - limit: number == 1 ? 2 : number, + limit: number < 2 ? 2 : number, ); if (images.isEmpty != true) { for (var element in images) {