spiderweb_photo 0.3.4+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 43

photo #

pub package GitHub GitHub stars

image picker, multi picker

support ios icloud

support video

use flutter as ui

if you want to build custom ui, you just need api to make custom ui. to use photo_manager or fork the library to custom ui.

Screenshot #


install #

latest version : pub package

  photo: $latest_version

Import #

import 'package:photo/photo.dart';
import 'package:photo_manager/photo_manager.dart';

use #

void pickAsset() async {
    List<AssetEntity> imgList = await PhotoPicker.pickAsset(
      context: context,
      // BuildContext requied

      /// The following are optional parameters.
      themeColor: Colors.green,
      // the title color and bottom color
      padding: 1.0,
      // item padding
      dividerColor: Colors.grey,
      // divider color
      disableColor: Colors.grey.shade300,
      // the check box disable color
      itemRadio: 0.88,
      // the content item radio
      maxSelected: 8,
      // max picker image count
      provider: I18nProvider.chinese,
      // i18n provider ,default is chinese. , you can custom I18nProvider or use ENProvider()
      rowCount: 5,
      // item row count
      textColor: Colors.white,
      // text color
      thumbSize: 150,
      // preview thumb size , default is 64
      sortDelegate: SortDelegate.common,
      // default is common ,or you make custom delegate to sort your gallery
      checkBoxBuilderDelegate: DefaultCheckBoxBuilderDelegate(
        activeColor: Colors.white,
        unselectedColor: Colors.white,
      ), // default is DefaultCheckBoxBuilderDelegate ,or you make custom delegate to create checkbox

          this, // if you want to build custom loading widget,extends LoadingDelegate [see example/lib/main.dart]

      badgeDelegate: const DefaultBadgeDelegate(), /// or custom class extends [BadgeDelegate]

      pickType: type, // all/image/video

      List<AssetPathEntity> photoPathList, /// when [photoPathList] is not null , [pickType] invalid .

About photoPathList params #

You can use [photo_manager] package to get List<AssetPathEntity> and handle or cache.

This parameter is then passed into the pickAsset method, where the incoming photoList is rendered instead of the data in the album.

Whole example #

You can see github main.dart

About android #

Migrate to androidX #

See the gitbook

Glide #

Android native use glide to create image thumb bytes, version is 4.8.0.

If your other android library use the library, and version is not same, then you need edit your android project's build.gradle.

rootProject.allprojects {

    subprojects {
        project.configurations.all {
            resolutionStrategy.eachDependency { details ->
                if (details.requested.group == 'com.github.bumptech.glide'
                        && details.requested.name.contains('glide')) {
                    details.useVersion "4.8.0"


if you use the proguard

see the github

About ios #

Because the album is a privacy privilege, you need user permission to access it. You must to modify the Info.plist file in Runner project.

like next

<string>App need your agree, can visit your album</string>

xcode like image in xcode

Build error #

if you build error like include of non-modular header inside framework module, see #10 or so

Thanks #

Part of the Android code comes from debuggerx01.

If my code helps you, and you're willing to buy me a cup of coffee.

you can use paypal

or scan my alipay


0.3.4+1 #

Add Traditional Chinese. Remove no permission dialog and add callback to handle. Let preview page check box constraints to device width. (Which fix strange layout in iPhone XR )

0.3.4 #

rollback photo_manager to 0.3.4

0.3.3 #

rollback photo_manager to 0.3.3

0.3.2 #

rollback photo_manager to 0.3.2

0.3.1 #

photo_manager to 0.3.1

If the selected image is deleted by other applications, the selected status in the selector will be updated correctly.

0.3.0 add params photoList #

Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.


  • When the album changes, it refreshes in real time.


  • Video duration badge time problem.
  • Images sort by create time.

0.2.0 #

break change support pick only image or video

0.1.11 #

fix pubspec version

0.1.10 fix bug #

fix a error widget bug.

0.1.9 #

fix all assets i18n provider

0.1.8 #

Fixed crash bug when the number of photos or videos was zero.

0.1.7 #

add a badge delegate for asset

0.1.6 rollback photo_manager version #

sort asset by date

0.1.5 rollback photo_manager version #

0.1.4 fix thumb is null bug #

fix thumb bug.

0.1.3 support ios icloud asset #

0.1.2 fix bug #

fix all path hasVideo property bug

0.1.1 fix bug and add params #

add loadingDelegate

0.1.0 support video #

API incompatibility

ImageXXX rename AssetXXX

0.0.8 fix bug #

DefaultCheckBoxBuilderDelegate params checkColor not valid bug

0.0.7 fix bug #

fix dividerColor not valid bug

0.0.6 add checkbox delegate #

users can use CheckBoxDelegate to custom preview right bottom widget

0.0.5 add a params #

add the sort delegate to help user sort gallery

Optimized LruCache

add a loading refresh indicator in the gallery

0.0.4 fix #1 #

fix request other permission will crash bug

depo photo_manager 0.0.3

0.0.3 add the thumb size to option #

add a params for pick image , thumb size

0.0.2 fix bug #

preview sure button bug preview bottom safeArea

0.0.1 first version #

image picker


example #

photo library example

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  spiderweb_photo: ^0.3.4+1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:spiderweb_photo/spiderweb_photo.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-0.53 points)

123 out of 125 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/spiderweb_photo.dart. (-0.50 points)

Analysis of lib/spiderweb_photo.dart reported 1 hint:

line 15 col 8: Unused import: 'package:spiderweb_photo/src/ui/dialog/not_permission_dialog.dart'.

Fix lib/src/provider/config_provider.dart. (-0.50 points)

Analysis of lib/src/provider/config_provider.dart reported 1 hint:

line 22 col 15: 'inheritFromWidgetOfExactType' is deprecated and shouldn't be used. Use dependOnInheritedWidgetOfExactType instead. This feature was deprecated after v1.12.1..

Format lib/src/ui/page/main/bottom_widget.dart.

Run flutter format to format lib/src/ui/page/main/bottom_widget.dart.

Format lib/src/ui/page/photo_main_page.dart.

Run flutter format to format lib/src/ui/page/photo_main_page.dart.

Format lib/src/ui/page/photo_preview_page.dart.

Run flutter format to format lib/src/ui/page/photo_preview_page.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (photo_manager).

The package description is too short. (-19 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
photo_manager ^0.3.4 0.3.5 0.4.7
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies