pickMultiImage static method

Future<List<String>?> pickMultiImage()

Implementation

static Future<List<String>?> pickMultiImage() async {
  final picker = ImagePicker();
  final pickedFiles = await picker.pickMultiImage();

  if (pickedFiles.isNotEmpty) {
    List<String> images = [];
    for (var file in pickedFiles) {
      var img = await OssHelper.upload(file: File(file.path));
      images.add(img);
    }
    return images;
  }
  return null;
}