An assets picker in WeChat style, support multi assets picking.

Overview

Flutter WeChat Assets Picker

pub package pub package Build status CodeFactor GitHub license

Awesome Flutter GitHub stars GitHub forks FlutterCandies

Language: English | 中文

An assets picker which based on the WeChat's UI, using photo_manager for asset implementation, extended_image for image preview, and provider to help control the state of the picker.

To take a photo or a video for assets, please check the detailed usage in the example, and head over to wechat_camera_picker.

All UI designs are based on WeChat 8.x, and it will be updated following the WeChat update in anytime.

Category 🗂

Migration Guide ♻️

See Migration Guide.

Features

  • ♻️ Fully implementable with delegates override
  • 💚 99% similar to WeChat style
  • ⚡️ Adjustable performance according to parameters
  • 📷 Image asset support
    • 🔬 HEIC/HEIF Image type support
  • 🎥 Video asset support
  • 🎶 Audio asset support
  • 1️⃣ Single asset mode
  • 💱 i18n support
    • RTL language support
  • Special item builder (prepend/append) support
  • 🗂 Custom sort path delegate support
  • 📝 Custom text delegate support
  • Custom filter options support ( photo_manager )
  • 🎏 Fully customizable theme
  • 💻 macOS support

Screenshots 📸

1 2 3
4 5 6
7 8 9
10 10 12

READ THIS FIRST ‼️

Although the package provides assets selection, it still requires users to build their own methods to handle upload, image compress, etc. If you have any questions about how to build them, please run the example or refer to photo_manager for API usage.

Preparing for use 🍭

Version constraints

Flutter SDK: >=2.0.0 .

If you got a resolve conflict error when running flutter pub get, please use dependency_overrides to fix it. See here .

Flutter

Add wechat_assets_picker to pubspec.yaml dependencies.

dependencies:
  wechat_assets_picker: ^latest_version

The latest stable version is: pub package

The latest dev version is: pub package

Then import the package in your code:

import 'package:wechat_assets_picker/wechat_assets_picker.dart';

Android

Required permissions: INTERNET, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, ACCESS_MEDIA_LOCATION. If you don't need the ACCESS_MEDIA_LOCATION permission, see Disable ACCESS_MEDIA_LOCATION permission.

If you found some warning logs with Glide appearing, then the main project needs an implementation of AppGlideModule. See Generated API.

iOS

  1. Platform version has to be at least 9.0. Modify ios/Podfile and update accordingly.
platform :ios, '9.0'
  1. Add the following content to info.plist.

   
    NSAppTransportSecurity
   

   
	
    
     NSAllowsArbitraryLoads
    
	
    

   

   
    NSPhotoLibraryUsageDescription
   

   
    Replace with your permission description.
   

macOS

  1. Platform version has to be at least 10.15. Modify macos/Podfile and update accordingly.
platform :osx, '10.15'
  1. Set the minimum deployment target to 10.15. Use XCode to open macos/Runner.xcworkspace .

  2. step 1

  3. step 2

  4. Follow the iOS instructions and modify info.plist accordingly.

Usage 📖

Name Type Description Default
selectedAssets List ? Selected assets. Prevent duplicate selection. If you don't need to prevent duplicate selection, just don't pass it. null
maxAssets int Maximum asset that the picker can pick. 9
pageSize int? Number of assets per page. Must be a multiple of gridCount. 320 (80 * 4)
gridThumbSize int Thumbnail size for the grid's item. 200
pathThumbSize int Thumbnail size for the path selector. 80
previewThumbSize List ? Preview thumbnail size in the viewer. null
gridCount int Grid count in picker. 4
requestType RequestType Request type for picker. RequestType.image
specialPickerType SpacialPickerType? Provides the option to integrate a custom picker type. null
themeColor Color? Main theme color for the picker. Color(0xff00bc56)
pickerTheme ThemeData? Theme data provider for the picker and the viewer. null
sortPathDelegate SortPathDeleage? Path entities sort delegate for the picker, sort paths as you want. CommonSortPathDelegate
textDelegate AssetsPickerTextDelegate? Text delegate for the picker, for customize the texts. DefaultAssetsPickerTextDelegate()
filterOptions FilterOptionGroup? Allow users to customize assets filter options. null
specialItemBuilder WidgetBuilder? The widget builder for the special item. null
specialItemPosition SpecialItemPosition Allow users set a special item in the picker with several positions. SpecialItemPosition.none
loadingIndicatorBuilder IndicatorBuilder? Indicates the loading status for the builder. null
allowSpecialItemWhenEmpty bool Whether the special item will display or not when assets is empty. false
selectPredicate AssetSelectPredicate Predicate whether an asset can be selected or unselected. null
routeCurve Curve The curve which the picker use to build page route transition. Curves.easeIn
routeDuration Duration The duration which the picker use to build page route transition. const Duration(milliseconds: 500)

Simple usage

final List<AssetEntity> assets = await AssetPicker.pickAssets(context);

Using custom delegate

final YourAssetPickerProvider provider = yourProvider;
final CustomAssetPickerBuilderDelegate builder = yourBuilder(provider);
final List<YourAssetEntity>? result = await AssetPicker.pickAssetsWithDelegate(
  context,
  provider: provider,
  delegate: builder,
);

You can use the keepScrollOffset feature only with the pickAssetsWithDelegate method. See the Keep scroll offset pick method in the example for how to implement it.

Detailed usage

TL;DR, we've put multiple common usage with the packages into the example.

Regular picking

You can both found List pickMethods in example/lib/pages/multi_assets_page.dart and example/lib/pages/single_assets_page.dart, which provide methods in multiple picking and single picking mode. Assets will be stored temporary and displayed at the below of the page.

Multiple assets picking

The maximum assets limit is 9 in the multiple picking page, and you can modify it as you wish.

Some methods can only work with multiple mode, such as "WeChat Moment".

Single asset picking

Only one and maximum to one asset can be picked at once.

Custom pickers

You can try custom pickers with the "Custom" page. We only defined a picker that integrates with Directory and File (completely out of the photo_manager scope). You can submit PRs to create your own implementation if you found your implementation might be useful for others. See [Contribute custom implementations][lib/customs/CONTRIBUTING.md] for more details.

Display selected assets

The AssetEntityImageProvider can display the thumb image of images & videos, and the original data of image. Use it like a common ImageProvider.

Image(image: AssetEntityImageProvider(asset, isOriginal: false))

Check the example for how it displays.

Register assets change observe callback

AssetPicker.registerObserve(); // Register callback.
AssetPicker.unregisterObserve(); // Unregister callback.

Customize with your own type or UI

AssetPickerBuilderDelegate, AssetPickerViewerBuilderDelegate, AssetPickerProvider and AssetPickerViewerProvider are all exposed and overridable. You can extend them and use your own type with generic type , then implement abstract methods. See the Custom page in the example which has an implementation based on types.

Frequently asked question

Build failed with Unresolved reference: R

e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (116, 36): Unresolved reference: R
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerDeleteManager.kt: (119, 36): Unresolved reference: createTrashRequest
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\PhotoManagerPlugin.kt: (341, 84): Unresolved reference: R
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\Android30DbUtils.kt: (34, 34): Unresolved reference: R
e: <path>\photo_manager-x.y.z\android\src\main\kotlin\top\kikt\imagescanner\core\utils\IDBUtils.kt: (27, 67): Unresolved reference: R

FAILURE: Build failed with an exception.

Run flutter clean first.

How can I get path from the AssetEntity to integrate with File object, upload or edit?

You don't need it (might be).

You can always request the File object with entity.originFile, if Uint8List then entity.originBytes.

If you still need path after requested the File, get it through file.absolutePath.

How can I change the name of "Recent" or other entities name/properties?

The path entity called "Recent", brought by photo_manager in the path entities list, includes all AssetEntity on your device. "Recent" is a system named entity in most platforms. While we provided ability to customize the text delegate, the name/properties can only be updated with SortPathDelegate. This is the only way that you have access to all path entities, or the only way that we exposed currently.

To change the name of the path entity, extend the CommonSortPathDelegate with your own delegate, then write something like the code below:

/// Create your own sort path delegate.
class CustomSortPathDelegate extends CommonSortPathDelegate {
  const CustomSortPathDelegate();

  @override
  void sort(List<AssetPathEntity> list) {
    ///...///

    // In here you can check every path entities if you want.
    // The only property we recommend to change is [name],
    // And we have no responsibility for issues caused by
    // other properties update.
    for (final AssetPathEntity entity in list) {
      // If the entity `isAll`, that's the "Recent" entity you want.
      if (entity.isAll) {
        entity.name = 'Whatever you want';
      }
    }

    ///...///
  }
}

Pass the delegate through the static call method, then you will get a self-named path entity.

Create AssetEntity from File or Uint8List (rawData)

In order to combine this package with camera shooting or something related, there's a solution about how to create an AssetEntity with File or Uint8List object.

final File file = your_file; // Your file object
final Uint8List byteData = await file.readAsBytes(); // Convert to Uint8List
final AssetEntity imageEntity = await PhotoManager.editor.saveImage(byteData); // Saved in the device then create an AssetEntity

If you don't want to keep the asset in your device, just delete it after you complete with your process (upload, editing, etc).

final List<String> result = await PhotoManager.editor.deleteWithIds([entity.id]);

ref: flutter_photo_manager#insert-new-item

Glide warning 'Failed to find GeneratedAppGlideModule'

W/Glide   (21133): Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in you application ana a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored.

Glide needs annotation to keep singleton, prevent conflict between instances and versions, so while the photo manager uses Glide to implement image features, the project which import this should define its own AppGlideModule. See Android section for implementation.

Disable ACCESS_MEDIA_LOCATION permission

Android contains ACCESS_MEDIA_LOCATION permission by default. This permission is introduced in Android Q. If your app doesn't need the permission, you need to add the following node to the AndroidManifest.xml in your app:

">
<uses-permission
  android:name="android.permission.ACCESS_MEDIA_LOCATION"
  tools:node="remove"
  />

Contributors

Many thanks to these wonderful people (emoji key):


Alex Li

💻 🎨 📖 💡 🤔 🚧 💬 👀

Caijinglong

💡 🤔

Marcel Schneider

🐛 💻 🤔

ganlanshu0211

🐛 🤔

JasonHezz

🐛 💻

Yaniv Shaked

🌍 💻 🐛 🚧

avi-yadav

💻

Letalus

🐛 🌍

greymag

🌍

Nickolay Savchenko

🎨

Kosuke Saigusa

🌍

三闻书店

📖

DidiosFaust

🌍

xiejie

🐛

This project follows the all-contributors specification. Contributions of any kind welcomed!!

Acknowledgement

Every aspect of IntelliJ IDEA has been designed to maximize developer productivity. Together, intelligent coding assistance and ergonomic design make development not only productive but also enjoyable.

Thanks to JetBrains for allocating free open-source licenses for IDEs such as IntelliJ IDEA.

Comments
  • 🎨 UI improvements

    🎨 UI improvements

    Sorry for the multiple pull-requests (I'm trying to push the wechat assets picker to be integrated into MegaTok's next official version...)

    This PR has the following improvements:

    • Display localized folder label "Folder" (according to language) in the app bar path entity selector.
    • Support for LTR/RTL language text direction (added to the AssetsPickerTextDelegate)
    • Auto resize of box constraints for pathEntitySelector according to selected assets.

    Some "after" screenshots:

    Chinese app bar before selection: image

    Chinese app bar after selection: image

    Hebrew app bar before selection: image

    Hebrew app bar after selection: image

    opened by yanivshaked 31
  • [BUG] Empty list shown when device has folders containing pictures

    [BUG] Empty list shown when device has folders containing pictures

    Describe the bug Asset picker shows 'Empty list' even though device has pictures in library

    How to reproduce Called with:

    await AssetPicker.pickAssets(
          context,
          pickerConfig: AssetPickerConfig(
            requestType: RequestType.image,
        ),
    );
    

    permissions in AndroidManifest:

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

    Steps to reproduce the behavior:

    1. Open the asset picture
    2. Empty list is dipslayed

    Expected behavior The device files containing images to be displayed.

    Screenshots (If contains) image

    Version information

    • Device: Google Pixel 6
    • OS: Android 13
    • Package Version: 8.1.4
    • Flutter Version: 3.6.0

    Additional context This package used to work with 7.3.2 but now I checkout this version still this unexpected 'Empty list' behaviour occurs. I couldn't say what changed since then, Android Version? An incompatible image type?

    s: bug i: lack of information await investigate b: third party r: photo_manager b: flutter p: Android 
    opened by ayomessenger 21
  • ✨ Ability to disable preview of assets using flag (showPreview)

    ✨ Ability to disable preview of assets using flag (showPreview)

    Hi,

    I have added a new flag called showPreview to AssetPicker.pickAssets.

    Default behavior (default value of showPreview parameter is true) is identical to the behavior so far: if you click an asset, you will get a preview of it. If you click the small circle, you select the asset. But if you provide showPreview with false, there is no option to show preview. Instead, click on an assert will either add it to selection (multi assets mode) or select it (single assets more). That behavior is closer to "mainstream" application which have an image picker integrated (Facebook, Whatsapp, Instgram, Megatok, etc..).

    I hope you will find this PR interesting and worthy to integrate soon.

    Thank you, Yaniv

    s: feature s: UI release candidate 
    opened by yanivshaked 21
  • [BUG] Navigation bar's color unable to restored after the picker was dismissed

    [BUG] Navigation bar's color unable to restored after the picker was dismissed

    Describe the bug (描述) BottomNavigationBar color was changed after picker closed How to reproduce (如何复现) close picker

    Steps to reproduce the behavior (描述复现步骤):

    close picker

    Expected behavior (期望行为)

    Screenshots (If contains) (是否有截图可以提供) If applicable, add screenshots to help explain your problem.

    Device information (设备信息)

    • Device: Android

    Additional context (附加信息) Add any other context about the problem here. 在此提供更多的内容。

    s: bug b: flutter p: Android 
    opened by fangshengfy 21
  • [Feature] Optimization required: It is taking to long for the grid to show

    [Feature] Optimization required: It is taking to long for the grid to show

    Version information

    • Device: Android OnePlus 8T
    • OS: Android 10
    • Package Version: 5.2.1
    • Flutter Version: 2.0.5

    Is your feature request related to a problem? Opening the picker, it is taking too long until the grid appears with the images. If you compare the performance to other pickers in the market, this picker takes a long time to present the grid.

    Describe the solution you'd like I have tried to run some tests to focus on the performance bottle neck. I am not sure, but it appears that the generation of the thumbnail per image is taking quite some time:

          final List<int> _thumbSize = thumbSize!;
          final Stopwatch sw = Stopwatch()..start();
          data = await key.entity.thumbDataWithSize(_thumbSize[0], _thumbSize[1]);
          print('thumbDataWithSize ${sw.elapsedMilliseconds}');
    

    output:

    I/flutter (23576): thumbDataWithSize 250
    I/flutter (23576): thumbDataWithSize 239
    I/flutter (23576): thumbDataWithSize 236
    I/flutter (23576): thumbDataWithSize 233
    I/flutter (23576): thumbDataWithSize 230
    I/flutter (23576): thumbDataWithSize 227
    I/flutter (23576): thumbDataWithSize 224
    I/flutter (23576): thumbDataWithSize 220
    I/flutter (23576): thumbDataWithSize 217
    I/flutter (23576): thumbDataWithSize 213
    I/flutter (23576): thumbDataWithSize 210
    I/flutter (23576): thumbDataWithSize 206
    I/flutter (23576): thumbDataWithSize 193
    I/flutter (23576): thumbDataWithSize 190
    I/flutter (23576): thumbDataWithSize 200
    

    Note: There is a bug in the "Custom Image Preview thumb size". It is not actually working - the thumb size is lost in the way. I will submit a PR to fix it (the bug is NOT in the example code but in the plugin itself).

    Describe alternatives you've considered

    • Tried reducing the image preview thumb size (after locally fixing the bug) - it helps, but not too much
    • Tried reducing the routeDuration and other durations in code - didn't help
    • Tried replacing default SortPathDelegate.common with SortPathDelegate.empty.empty (which does nothing), almost no change

    Several solutions which should be inspected

    • Check for PhotoManager preload thumb feature: PhotoManager PreloadThumb
    • Don't wait for all images thumb to be ready, display each when ready (does it work like that now?)
    • Using the image itself instead of generating a thumbnail per image (probably not a good idea, but should be tested)
    i: lack of information e: goal e: performance r: photo_manager b: flutter e: PR welcomed 
    opened by yanivshaked 12
  • [BUG] I have given the album read/write permission on iOS 13.x and still cannot access the album

    [BUG] I have given the album read/write permission on iOS 13.x and still cannot access the album

    Describe the bug When using on iOS 13.x devices, images cannot be selected.

    How to reproduce

    PermissionState result = await PhotoManager.requestPermissionExtend();
    
    if (result.isAuth || (Platform.isIOS && result == PermissionState.limited)) {
        List<AssetEntity>? result = await AssetPicker.pickAssets(
          context,
        );
    }
    

    Steps to reproduce the behavior:

    1. You need to prepare an iOS 13.4.1 device, (and users have reported problems with 13.6 devices)
    2. Just execute the above simple code.

    Expected behavior Works fine like other iOS versions。

    Screenshots (If contains)

    https://user-images.githubusercontent.com/8766034/189784596-e5bf2c41-e921-47ef-9297-332f8b2fab7b.mov

    Version information

    • Device: iPhone SE 2
    • OS: iOS 13.4.1
    • Package Version: 8.0.2
    • Flutter Version: 3.3.1

    Additional context Previously using version 7.3.2 it worked fine on all iOS devices. Later, because I upgraded the Flutter version, I just saw a new version of wechat_assets_picker, so I also upgraded.

    s: bug s: developing ⏳TODAY p: iOS 
    opened by hellohejinyu 11
  • PhotoManager.editor.deleteWithIds not working on android api 29 and above

    PhotoManager.editor.deleteWithIds not working on android api 29 and above

    PhotoManager.editor.deleteWithIds working properly on ios and up to android api 28. But not working on android 29.

    1. Clone the example flutter_wechat_assets_picker project.
    2. Go to single_assets_page.dart file.
    3. Add this (PhotoManager.editor.deleteWithIds([assets.first.id]);) line in _selectedAssetDeleteButton method's gesture detector onTap callback to delete media.
    4. Run app on emulator have api 29 and pick one photo from "Single" tab and see the selected assets panel.
    5. Touch the selected photo the delete(X) button will be available.
    6. Touch to delete button and you will continue to see your selected photo on gallery.
    7. If you run app on emulator with api 28 or below the selected photos will be deleted.

    [Test on api 27] We want to delete selected image from the gallery. And it works fine on api 28 or below. https://streamable.com/iof195

    [Test on api 29] Please notice! After deleting the image it is not showing on gallery so its works fine on api 28 or below. But on api 29 the deleted images showing again on gallery. Probably its not deleting anytime. https://streamable.com/tg429z

    s: bug b: third party r: photo_manager p: Android 
    opened by ibragunduz 11
  • [Feature] Take picture with Camera in list image picker

    [Feature] Take picture with Camera in list image picker

    Version information (版本信息)

    • Device: e.g. iPhone6
    • OS: e.g. iOS 13.4
    • Package Version: e.g. v2.1.0
    • Flutter Version: e.g. v1.17.1

    Is your feature request related to a problem? (功能是否与已有问题关联) Capture camera.

    Describe the solution you'd like (描述你期望的解决方案) Capture camera when picker multi image, insert one more button on index 0 of list image picker!

    Describe alternatives you've considered (其他解决方案或疑虑) A clear and concise description of any alternative solutions or features you've considered.

    Additional context (附加内容) Add any other context or screenshots about the feature request here.

    s: feature s: UI release candidate r: photo_manager 
    opened by nhtlquan 11
  • [Missing feature] The image preview is missing the current selection

    [Missing feature] The image preview is missing the current selection

    The header and bottom selection widgets are missing from the actual widget you provided, it makes it hard to select items only by using the small icon on the top: I am using android 10, OnePlus 7 Pro

    | Expected (given by you) | Current (on my phone) | | :------------: | :------------: | | your work | what i get |

    s: enhancement 
    opened by PavieOlivier 11
  • [Feature] How to mock AssetPicker.pickAssets in test

    [Feature] How to mock AssetPicker.pickAssets in test

    This feature request is how to mock AssetPicker.pickAssets to test whether it is actually called with the correct arguments. I am running in IOS simulator, we will need to add this key in ios/Runer/Info.plist, otherwise the simulator will close unexpectedly after clicking the add button.

    <key>NSPhotoLibraryUsageDescription</key>
    <string>Autorize app to use photos from your gallery.</string>
    

    main.dart

    import 'package:flutter/material.dart';
    import 'package:wechat_assets_picker/wechat_assets_picker.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: const MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      const MyHomePage({Key? key, required this.title}) : super(key: key);
    
      final String title;
    
      @override
      State<MyHomePage> createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: const [],
            ),
          ),
          floatingActionButton: FloatingActionButton(
            onPressed: () async {
              final List<AssetEntity>? result =
                  await AssetPicker.pickAssets(context);
            },
            tooltip: 'Add photo',
            child: const Icon(Icons.add),
          ),
        );
      }
    }
    
    

    widget_test.dart

    import 'package:flutter/material.dart';
    import 'package:flutter_test/flutter_test.dart';
    import 'package:wechat/main.dart';
    
    void main() {
      testWidgets('Counter increments smoke test', (WidgetTester tester) async {
        await tester.pumpWidget(const MyApp());
    
        await tester.tap(find.byIcon(Icons.add));
        await tester.pump();
      });
    }
    
    s: enhancement e: goal await response s: feature ⏳WEEK 
    opened by IvoneDjaja 9
  • [BUG] Project does not compile to web using 7+ version (worked fine before)

    [BUG] Project does not compile to web using 7+ version (worked fine before)

    Describe the bug

    Project does not compile in web using 7.0.1. It worked fine with <7 version. There is no problem on mobile.

    It looks like it is related to live pictures and extended_image_library.

    Tested and found in both 7.0.0 and 7.0.1.

    How to reproduce

    Steps to reproduce the behavior:

    1. Add this plugin (wechat_assets_picker: ^7.0.1) to pubspec.yaml
    2. Start debugging to chrome.
    3. Failed to compile application. error message in the log

    Expected behavior

    Even if this plugin does not support web, project should be able to compile for web env normally, like in previous version.

    Version information

    • Device: Chrome
    • OS: Macbook pro (intel chip)
    • Package Version: 7.0.1
    • Flutter Version: 2.10.3

    Additional context

    Launching lib[/main.dart]() on Chrome in debug mode...
    libmain.dart:1
    : Error: A value of type 'File*1*?' can't be assigned to a variable of type 'File*2*?'.
    ..…builderimage_page_builder.dart:53
     - 'File/*1*/' is from 'dart:io'.
    - 'File/*2*/' is from 'package:extended_image_library[/src/_platform_web.dart]()' ('.[./../../.pub-cache/hosted/pub.dartlang.org/extended_image_library-3.1.2/lib/src/_platform_web.dart]()').
    package:extended_image_librarysrc_platform_web.dart:1
          file = await widget.asset.originFileWithSubtype;
    
                 ^
    : Error: A value of type 'File*1*?' can't be assigned to a variable of type 'File*2*?'.
    ..…builder/image_page_builder.dart:55
     - 'File/*1*/' is from 'dart:io'.
    - 'File/*2*/' is from 'package:extended_image_library[/src/_platform_web.dart]()' ('.[./../../.pub-cache/hosted/pub.dartlang.org/extended_image_library-3.1.2/lib/src/_platform_web.dart]()').
    package:extended_image_librarysrc_platform_web.dart:1
          file = await widget.asset.fileWithSubtype;
                 ^
    
    : Error: The argument type 'File*1*' can't be assigned to the parameter type 'File*2*'.
    ../…/builder/image_page_builder.dart:61
    - 'File/*1*/' is from 'package:extended_image_library[/src/_platform_web.dart]()' ('.[./../../.pub-cache/hosted/pub.dartlang.org/extended_image_library-3.1.2/lib/src/_platform_web.dart]()').
    package:extended_image_librarysrc_platform_web.dart:1
    
     - 'File/*2*/' is from 'dart:io'.
          file,
          ^
    
    Failed to compile application.
    Exited (sigterm)
    
    s: enhancement b: third party r: extended_image ⏳WEEK 
    opened by LeGoffMael 9
  • [BUG] Padding issue in MultiTabs delegate example on iOS

    [BUG] Padding issue in MultiTabs delegate example on iOS

    Describe the bug There is an unnecessary padding at the top of the grid view in the MultiTabAssetPickerBuilder example on iOS.

    How to reproduce Run the MultiTabAssetPickerBuilder example on an iPhone.

    Expected behavior The grid view and the path list dropdown widget should be stick to the top of the view.

    It seems that it comes from kToolbarHeight at line 1197 and 1593 of DefaultAssetPickerBuilderDelegate.

    Remove it fix the issue for MultiTabAssetPickerBuilder but the problem of padding appear on the commun pickers when shouldRevertGrid: false.

    i could fixed it with an ugly fix, but it is definitely not ideal.

    MediaQuery(
      data: MediaQuery.of(context).copyWith(
        padding: const EdgeInsets.only(top: -kToolbarHeight),
      ),
      child: Builder(
        builder: (BuildContext context) => Stack(
          children: <Widget>[
            RepaintBoundary(
              child: Column(
                children: <Widget>[
                  Expanded(child: assetsGridBuilder(context)),
                  if (isPreviewEnabled) bottomActionBar(context),
                ],
              ),
            ),
            pathEntityListBackdrop(context),
            pathEntityListWidget(context),
          ],
        ),
      ),
    )
    

    Screenshots (If contains) the blue arrow shows the top padding | grid view | albums list | | -- | -- | | | |

    Version information

    • Device: iPhone 11 pro
    • OS: 16.1.1
    • Package Version: master branch, 8.2.0
    • Flutter Version: 3.3.9
    s: enhancement await investigate s: UI e: PR welcomed 
    opened by LeGoffMael 1
  • [Feature] Support selecting assets by drag operation

    [Feature] Support selecting assets by drag operation

    This feature request is about the ability to use a drag operation for selecting assets. It is very convenient, and make it easier for the user to select multiple assets at once. An existing plugin which might be a part of the solution: https://pub.dev/packages/drag_select_grid_view

    e: goal s: feature await investigate s: UI e: PR welcomed 
    opened by yanivshaked 2
  • 开issue前必读 (Read before create a new issue)

    开issue前必读 (Read before create a new issue)

    Knowing issues that will not fix

    • #81
    • #79

    Issues let users and developers be able to feedback their problem in usage, their request for features, their confusion about the source code and classes, rather than the place to make argument, say bad words, ask for a non-sense help, or bring up some off-topic words. So before you submit new issues, please think twice that if it's really necessary to do it, or just go check the documentation or the example more carefully.

    Here're the things banned from the repository:

    • Not following the issue template. (including delete all content in the template, close immediately with invalid label)
    • Ask a question which has a clear explanation in document. (close immediately with i: read document label)
    • Ask a question which is not related to the package or it's dependencies. (close immediately with invalid (maybe stackoverflow) label)
    • 'reap without sowing' (close immediately with wontfix label)
    • Insulting anyone (ban & lock & close permanently)
    • (more to add...)

    国内用户请注意

    如果不是严重问题,可以加入 QQ群:181398081(请正确回答问题) 后,提供必要的信息进行提问。 如果你坚持要开 issue,请 尽量使用英文,因为 GitHub 为国际开源社区,你提的问题很有可能国际友人也有经历。如果你认为仅用英语表达不够完善,可以使用双语补充。 Issue 区是用来反馈使用问题、请求新功能实现、源码讨论的地方,不是用来进行无谓的争吵、爆粗、问无关问题、白嫖的地方。所以在提交新的 issue 前,请三思,如果三思后认为仍然需要开 issue,请继续你的行动,否则请出门左转文档区。

    以下内容将直接处理:

    • 不使用 issue 模板创建 issue、或使用了模板但是没有依照模板内容创建(立刻被关闭并打上 invalid 标签)
    • 问一个文档里已明确说明的问题(立刻被关闭并打上 i: read document 标签)
    • 问与该组件无关的问题(立刻被关闭并打上 invalid(也可能是 stackoverflow )标签)
    • 想白嫖(立刻被关闭并打上 wontfix 标签)
    • 侮辱任何人(立刻被 永久屏蔽 & 锁定 & 关闭
    • (更多暂时想不起来的事)

    933637000BD236B04928636CD26F8511

    📢EXTRA ATTENTION 
    opened by AlexV525 0
Releases(v8.3.1)
  • v8.3.1(Jan 2, 2023)

    What's Changed

    • New custom Instagram delegate by @LeGoffMael in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/403
    • Improve docs by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/402

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.3.0...v8.3.1

    Source code(tar.gz)
    Source code(zip)
  • v8.3.0(Dec 27, 2022)

    What's Changed

    New features

    • Add index argument to selectAsset in the AssetPickerBuilderDelegate. (#399)

    Improvements

    • Improve UI details in the AssetPickerAppBar. (#400)

    New Contributors

    • @LeGoffMael made their first contribution in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/399

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.2.0...v8.3.0

    Source code(tar.gz)
    Source code(zip)
  • v8.2.0(Dec 9, 2022)

    What's Changed

    New features

    • Allow overrides viewAsset in the AssetPickerBuilderDelegate. (#391) This will be considered a breaking change if the user extends classes from AssetPickerBuilderDelegate.

    Fixes

    • Correct behaviors when the access is limited on iOS. (#392)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.1.4...v8.2.0

    Source code(tar.gz)
    Source code(zip)
  • v8.1.4(Nov 8, 2022)

    What's Changed

    • Fix conditions with the confirm button on iOS. (#376)

    New Contributors

    • @leonpesdk made their first contribution in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/376

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.1.3...v8.1.4

    Source code(tar.gz)
    Source code(zip)
  • v8.1.3(Oct 12, 2022)

    What's Changed

    • 🔖 Bump photo_manager to explicitly remove the requirements of requiredLegacyExternalStorage by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/373

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.1.2...v8.1.3

    Source code(tar.gz)
    Source code(zip)
  • v8.1.2(Oct 4, 2022)

    What's Changed

    • 🐛 Fix the confirm button when selecting multiple assets with no preview by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/371

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.1.1...v8.1.2

    Source code(tar.gz)
    Source code(zip)
  • v8.1.1(Sep 21, 2022)

    What's Changed

    • 🐛 Fix conditions with the confirm button by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/367

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.1.0...v8.1.1

    Source code(tar.gz)
    Source code(zip)
  • v8.1.0(Sep 19, 2022)

    What's Changed

    New features

    • Upgrade photo_manager for Android 13. (#365)

    Improvements

    • Improve BuildContext usages to obtain the correct directionality for the assets grid. (#359)
    • Provide a better condition to the confirm button to make sure it displays correctly in all cases on iOS/macOS. (#359)
    • Improve bottomActionBar in DefaultAssetPickerBuilderDelegate. (#359)

    Fixes

    • Fix invalid path sort. (#364)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.0.2...v8.1.0

    Source code(tar.gz)
    Source code(zip)
  • v8.0.2(Aug 30, 2022)

    What's Changed

    Improvements

    • Adapt Flutter 3.3. (#354)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.0.1...v8.0.2

    Source code(tar.gz)
    Source code(zip)
  • v8.0.1(Aug 28, 2022)

    What's Changed

    Fixes

    • Fix not updated empty flag in DefaultAssetPickerProvider. (#353)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.0.0...v8.0.1

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0(Aug 13, 2022)

    What's Changed

    See Migration Guide to know more about breaking changes.

    New Features

    • Introduce PathWrapper in delegates to improve the overall loading speed. (#338)
    • Allow using Key during picking. (#339)
    • Add initializeDelayDuration for DefaultAssetPickerProvider. (#341)
    • Prevent race conditions with paths. (#342)
    • Expose sortPathsByModifiedDate. (#343)

    Fixes

    • Unify indicators usage to avoid accident indicator switching. (#344)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.3.2...v8.0.0

    Source code(tar.gz)
    Source code(zip)
  • v7.3.4(Aug 2, 2022)

    What's Changed

    • 🐛 Unify indicators usage by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/344

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.3.2...v7.3.4

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0-dev.2(Jul 20, 2022)

    What's Changed

    New Features

    • Add initializeDelayDuration for DefaultAssetPickerProvider. (#341)
    • Add sortPathsByModifiedDate. (#342)
    • Expose sortPathsByModifiedDate. (#343)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v8.0.0-dev.1...v8.0.0-dev.2

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0-dev.1(Jul 5, 2022)

    What's Changed

    To know more about breaking changes, see Migration Guide.

    New Features

    • Introduce PathWrapper in delegates to improve the overall loading speed. (#338)
    • Allow using Key during picking. (#339)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.3.2...v8.0.0-dev.1

    Source code(tar.gz)
    Source code(zip)
  • v7.3.2(Jun 11, 2022)

    What's Changed

    • Fix typo on README.md by @taqiabdulaziz in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/333
    • ⚡️ Improve onChangingSelected in AssetPickerViewerBuilderDelegate by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/332
    • 🐛 Fix behaviors when unselecting all assets in the viewer by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/335

    New Contributors

    • @taqiabdulaziz made their first contribution in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/333

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.3.1...v7.3.2

    Source code(tar.gz)
    Source code(zip)
  • v7.3.1(Jun 3, 2022)

    What's Changed

    • ⚡️ Improve selection callers between picker and viewer by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/327

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.3.0...v7.3.1

    Source code(tar.gz)
    Source code(zip)
  • v7.3.0(May 12, 2022)

    What's Changed

    • 🚀 Migrate to Flutter 3, drop supports for previous Flutter versions by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/317

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.2.0...v7.3.0

    Source code(tar.gz)
    Source code(zip)
  • v7.3.0-dev.1(May 11, 2022)

    What's changed

    Migrate to Flutter 2.13, and drop supports for older Flutter versions.

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.2.0...v7.3.0-dev.1

    Source code(tar.gz)
    Source code(zip)
  • v7.2.0(May 8, 2022)

    What's Changed

    New features

    • Separate AssetPickerDelegate (#315), which provides the ability to override methods within the AssetPicker.

    Improvements

    • Improve specialItemBuilder. (#314)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.1.2...v7.2.0

    Source code(tar.gz)
    Source code(zip)
  • v7.1.2(Apr 27, 2022)

    What's Changed

    Fixes

    • Fix context usages for inherited theme data.
    • Fix unlinked path name builder.

    Improvements

    • Update how paths get update. (#312)
    • Expose DefaultAssetPickerProvider.forTest.

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.1.1...v7.1.2

    Source code(tar.gz)
    Source code(zip)
  • v7.1.1(Apr 21, 2022)

    What's Changed

    Fixes

    • Fix selectPredicate with the viewer by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/307

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.1.0...v7.1.1

    Source code(tar.gz)
    Source code(zip)
  • v7.1.0(Apr 7, 2022)

    What's Changed

    New features

    • LimitedPermissionOverlayPredicate by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/287
    • PathNameBuilder by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/303

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.5...v7.1.0

    Source code(tar.gz)
    Source code(zip)
  • v7.0.5(Mar 15, 2022)

    What's Changed

    Improvements

    • Support compile on the Web by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/273

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.4...v7.0.5

    Source code(tar.gz)
    Source code(zip)
  • v7.0.4(Mar 15, 2022)

    What's Changed

    Improvements

    • Make all text delegates const.

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.3...v7.0.4

    Source code(tar.gz)
    Source code(zip)
  • v7.0.3(Mar 13, 2022)

    What's Changed

    Fixes

    • 🚑️ Fix the broken semantics on iOS by @AlexV525 in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/272

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.2...v7.0.3

    Source code(tar.gz)
    Source code(zip)
  • v7.0.2(Mar 10, 2022)

    What's changed

    Fixes

    • Fix wrong conditions judging when obtaining path thumbnails.

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.1...v7.0.2

    Source code(tar.gz)
    Source code(zip)
  • v7.0.1(Mar 8, 2022)

    What's Changed

    Improvements

    • Support semantics with Japanese text delegates. (#266).

    Fixes

    • Obtain the path thumbnail only when the asset is image or video.

    New Contributors

    • @paigupai made their first contribution in https://github.com/fluttercandies/flutter_wechat_assets_picker/pull/266

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.0...v7.0.1

    Source code(tar.gz)
    Source code(zip)
  • v7.0.0(Mar 7, 2022)

    To know more about breaking changes, see Migration Guide.

    New features

    • Support predictable special item display. (#264)
    • Support live photos display. (#251)
    • Expose AssetPickerPageRoute for customization. (#248)
    • Add full semantics support. (#232, #235, #240, #242, #243, #245, #254)

    Improvements

    • Improve scaling with select indicators and numbers.
    • Implement the default light theme. (#234)

    Fixes

    • Fix LocallyAvailableBuilder with more edge conditions. (#263)
    • Fix potentially "No elements" error with thumbnails.
    Source code(tar.gz)
    Source code(zip)
  • v7.0.0-dev.4(Mar 3, 2022)

    What's Changed

    • Improve scaling with select indicators and numbers.
    • Fix LocallyAvailableBuilder with more edge conditions. (#263)
    • Fix potentially "No elements" error with thumbnails.
    • Support predictable special item display. (#264)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.0-dev.3...v7.0.0-dev.4

    Source code(tar.gz)
    Source code(zip)
  • v7.0.0-dev.3(Feb 22, 2022)

    What's Changed

    • Semantics support with multiple text delegates. (#235, #240, #242, #243, #245, #254)
    • Expose AssetPickerPageRoute for customization. (#248)
    • Support live photos display. (#251)

    Breaking changes

    • Architecture refactor partially for better customization. (#241)
    • Configs are all abstracted as AssetPickerConfig. (#250)

    Full Changelog: https://github.com/fluttercandies/flutter_wechat_assets_picker/compare/v7.0.0-dev.2...v7.0.0-dev.3

    Source code(tar.gz)
    Source code(zip)
Owner
FlutterCandies
Custom Flutter candies (packages) for you to build your Flutter app easily. Enjoy it!
FlutterCandies
A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.

emoji_picker_flutter Yet another Emoji Picker for Flutter ?? Note: This package is based on emoji_picker which has been deprecated and not maintained

Stefan Humm 99 Dec 24, 2022
HSV(HSB)/HSL/RGB/Material color picker inspired by all the good design for your amazing flutter apps.

flutter_colorpicker HSV(HSB)/HSL/RGB/Material color picker inspired by all the good design for your amazing flutter apps. Adorable color pickers out o

Dark Knight 279 Dec 30, 2022
A new Flutter package support scroll to index for Listview, Gridview and NestedScrollView

easy_scroll_to_index A new Flutter package support scroll to index for Listview, Gridview and NestedScrollView Author: DinhVanHung Demo Example: Displ

Dinh Hung 4 Nov 19, 2021
Flutter E-Commerce App UI with support for dark and light mode.

Flutter E-Commerce App UI with support for dark and light mode.

Martin Gogołowicz 18 Aug 19, 2022
Flutter Phone E-Store App UI with support for dark and light mode

Flutter Phone E-Store App UI with support for dark and light mode

Jakub Sobański 2 Apr 30, 2022
An assets picker in WeChat style, support multi assets picking.

An assets picker in WeChat style, support multi assets picking.

FlutterCandies 1.1k Jan 8, 2023
A camera picker in WeChat style.

A camera picker which is an extension for wechat_assets_picker. Based on camera for camera functions and photo_manager for asset implementation.

FlutterCandies 265 Dec 28, 2022
Nepali date picker - Material Style Date Picker with Bikram Sambat(Nepali) Calendar Support

Nepali Date Picker + Calendar Material and Cupertino Styled Date Picker, Date Range Picker and Calendar with Bikram Sambat(Nepali) Support. Nepali Dat

Sarbagya Dhaubanjar 35 Jan 3, 2023
Flutter WeChat Camera Picker

Flutter WeChat Camera Picker Language: English | 中文简体 A camera picker which is an extension for wechat_assets_picker. Based on camera for camera funct

null 1 Nov 14, 2021
null 0 Feb 2, 2022
Similar to Weibo dynamics, WeChat circle of friends, nine grid view controls to display pictures. Support single big picture preview.

Similar to Weibo dynamics, WeChat circle of friends, nine grid view controls to display pictures. Support single big picture preview.

Flutter中国开源项目 296 Dec 28, 2022
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.

image_editor The version of readme pub and github may be inconsistent, please refer to github. Use native(objc,kotlin) code to handle image data, it i

FlutterCandies 317 Jan 3, 2023
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.

photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相

FlutterCandies 526 Jan 4, 2023
Spider - A small dart library to generate Assets dart code from assets folder.

Spider A small dart library to generate Assets dart code from assets folder. It generates dart class with static const variables in it which can be us

Birju Vachhani 159 Nov 8, 2022
A flexible multi select package for Flutter. Make multi select widgets the way you want.

Multi Select Flutter Multi Select Flutter is a package for creating multi-select widgets in a variety of ways. Dialog BottomSheet ChoiceChip Features

null 177 Dec 20, 2022
Multi select flutter tejpal - A package for creating multi-select widgets in a variety of ways

Multi select flutter tejpal - A package for creating multi-select widgets in a variety of ways

Tejpal Singh 3 Jul 11, 2022
A day night time picker for Flutter. Beautiful day and night animation with Sun and Moon assets.

DayNightTimePicker A day night time picker for Flutter with Zero Dependencies. Default style: IOS style: View it on pub.dev Installation Add to pubspe

Subhamay Dutta 68 Dec 29, 2022
👇 Easy Google Photos style multi-selection for RecyclerViews, powered by Kotlin and AndroidX.

Drag Select Recycler View This library allows you to implement Google Photos style multi-selection in your apps! You start by long pressing an item in

Aidan Follestad 1.9k Jan 8, 2023
Flutter版微信SDK.WeChat SDK for flutter.

Fluwx 中文请移步此处 What's Fluwx Fluwx is flutter plugin for WeChatSDK which allows developers to call WeChatSDK native APIs. Join QQ Group now: 892398530。

OpenFlutter 2.7k Jan 3, 2023
h5pay plugin for wechat and alipay

Flutter H5Pay A Flutter plugin for h5pay(Support WeChat and Alipay) Usage Add flutter_h5pay as a dependency in your pubspec.yaml file. dependencies:

shingohu 15 Aug 24, 2021