aes_assets_widget plugin for Flutter

Getting Started

A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera. Support to preview photos and scale photos in full-screen

Android iOS
Support SDK 21+ iOS 9+


  • 支持图片、视频选择,支持拍照、拍视频
  • iOS支持图库多图片选择,安卓支持单图上传,都支持超上传上限提示
  • 支持图片、视频资源预览
  • 自带通用展示图片样式
  • 支持删除


  • 支持svg
  • 增加其他UI样式


image_picker: ^0.8.5+3 photo_view: ^0.14.0 dio: ^4.0.6




This plugin requires iOS 9.0 or higher.

Starting with version 0.8.1 the iOS implementation uses PHPicker to pick (multiple) images on iOS 14 or higher. As a result of implementing PHPicker it becomes impossible to pick HEIC images on the iOS simulator in iOS 14+. This is a known issue. Please test this on a real device, or test with non-HEIC images until Apple solves this issue. 63426347 - Apple known issue

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

  • NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
  • NSCameraUsageDescription - describe why your app needs access to the camera. This is called _ Privacy - Camera Usage Description_ in the visual editor.
  • NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.


Starting with version 0.8.1 the Android implementation support to pick (multiple) images on Android 4.3 or higher.

No configuration required - the plugin should work out of the box. It is however highly recommended to prepare for Android killing the application when low on memory. How to prepare for this is discussed in the Handling MainActivity destruction on Android section.

It is no longer required to add android:requestLegacyExternalStorage="true" as an attribute to the <application> tag in AndroidManifest.xml, as image_picker has been updated to make use of scoped storage.

Note: Images and videos picked using the camera are saved to your application's local cache, and should therefore be expected to only be around temporarily. If you require your picked image to be stored permanently, it is your responsibility to move it to a more permanent location.


import 'package:aes_assets_widget/aes_assets_widget.dart';

            late AesAssetsWidget _aesAssetsWidget;
            _aesAssetsWidget = AesAssetsWidget(
            dataList: [],
            title: '燃气表照片:',



           AESResultData result =
                 await UploaderUtil.upload(files: _aesAssetsWidget.dataList);


            dataList: [],
            title: '图片资源',
            authToken: const {





遇到最大的问题就是在Plugin中引用图片,一直加载失败困扰好几天。。。。,原因就是找不到路径,不过已经解决,可以参考插件代码和yaml资源路径配置,请严格按照配置语法来, 关键代码如下:

        const Image(
        image: AssetImage('assets/images/fix_add_image.png',
        package: 'aes_assets_widget'),