cj123195 / multi_image_picker_plus

Flutter plugin that allows you to display multi image picker on iOS and Android.
MIT License
3 stars 9 forks source link

multi_image_picker_plus

Flutter plugin that allows you to display multi image picker on iOS and Android.

Thanks to Sh1d0w, this plugin was first created by him, but he stopped updating it a long time ago, and now pub.dev can't find this plugin, but I think it is very useful for me, so I upgraded it to the latest version and re-issued it. For previously used multi image For the developers of picker, the use of Android is not much different from that before, but many configurations have been modified on IOS. These configurations can be found in the BSImagePicker document.

Key Features

Screenshot

Pick image

Pick video(Only iOS)

Installation

IOS

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

Android

Add the following permissions to your AndroidManifest.xml, located in <project root>/android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />

If your app targets Android 13 with targetSdk >= 33 then you will need to replace READ_EXTERNAL_STORAGE permission to this in your AndroidManifest.xml. Android documentation here

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE"
    android:maxSdkVersion="32" />

Usage

resultList = await MultiImagePicker.pickImages(
  selectedAssets: images,
  cupertinoOptions: CupertinoOptions(
    doneButton: UIBarButtonItem(title: 'Confirm', tintColor: colorScheme.primary),
    cancelButton: UIBarButtonItem(title: 'Cancel', tintColor: colorScheme.primary),
    albumButtonColor: Theme.of(context).colorScheme.primary,
  ),
  materialOptions: const MaterialOptions(
        maxImages: 300,
      enableCamera: true,
    actionBarColor: "#abcdef",
    actionBarTitle: "Example App",
    allViewTitle: "All Photos",
    useDetailsView: false,
    selectCircleStrokeColor: "#000000",
  ),
);

:::tip This library is only based on the Flutter wrapper of Android FishBun and iOS BSImagePicker. For detailed configuration, please refer to FishBun and BSImagePicker. :::

Credits

This software uses the following open source packages:

Related

image_picker - Official Flutter image picker plugin`

Contribution

Users are encouraged to become active participants in its continued development — by fixing any bugs that they encounter, or by improving the documentation wherever it’s found to be lacking.

If you wish to make a change, open a Pull Request — even if it just contains a draft of the changes you’re planning, or a test that reproduces an issue — and we can discuss it further from there.

License

MIT


GitHub @cj123195  ·