Flutter photo - video from album by flutter

Overview

archived

The package is archived. Please use flutter_wechat_assets_picker.

photo

pub package 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

image

install

latest version : pub package pub package

dependencies:
  photo: $latest_version

Import

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

Usage

Simple use

void pickAssets() async {
    List<AssetEntity> assetList = await PhotoPicker.pickAsset(context: context);
    /// Use assetList to do something.
}

More option

The context is required, other params is optional.

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,
        checkColor: Colors.blue,
      ), // default is DefaultCheckBoxBuilderDelegate ,or you make custom delegate to create checkbox

      loadingDelegate:
          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 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


   
    NSPhotoLibraryUsageDescription
   

   
    App need your agree, can visit your album
   

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.

Donate

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

you can use paypal

or scan my alipay

You might also like...

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

video_editor My other APIs Scroll Navigation Video Viewer Helpers Features Super flexible UI Design. Support actions: Crop Trim Scale Rotate Cover sel

Dec 26, 2022

Google I/O 2021 Photo Booth built with Flutter and Firebase

Google I/O 2021 Photo Booth built with Flutter and Firebase

I/O Photo Booth A Photo Booth built with Flutter and Firebase for Google I/O 2021. Try it now and learn about how it's made. Built by Very Good Ventur

Dec 29, 2022

A Flutter plugin to rotate, resize, move, delete text, photo or any other widget.

A Flutter plugin to rotate, resize, move, delete text, photo or any other widget.

sticker_view A Flutter plugin to rotate, resize, move, delete any text, image or any other widget. Available Features ✅ Rotate ✅ Resize ✅ Move ✅ Layer

Nov 26, 2022

NextPhoto - A Flutter Instagram look-alike photo blog application

NextPhoto - A Flutter Instagram look-alike photo blog application

A Flutter Instagram look-alike photo blog application. Uses jsonplaceholder for mock data. Please refer to coding task for info about desired features.

Aug 22, 2022

A photo gallery mobile application with Flutter.

A photo gallery mobile application with Flutter.

Photo Gallery Photo Gallery mobile application. Description Photo Gallery is a cross platform mobile application made with Flutter. This application u

Dec 23, 2022

A Fluttter based notes app with photo-notes support!

A Fluttter based notes app with photo-notes support!

Tizeno Tizeno is a beautiful open-source notes app for Android. It is built with Dart on top of Google's Flutter Framework. Tizeno helps one create qu

Nov 10, 2022

Immich - Self-hosted Photo backup solution directly from your mobile phone

IMMICH Self-hosted Photo backup solution directly from your mobile phone. Note T

Dec 31, 2022

Photo Seeds 🖼 🌱 An easier way for humans to create and recover wallets

Photo Seeds 🖼 🌱  An easier way for humans to create and recover wallets

Photo Seeds 🖼 🌱 An easier way for humans to create and recover wallets

Jun 2, 2022

Flutter youtube downloader - A Windows App made in Flutter to download mp3 or mp4 from a Youtube video

Flutter youtube downloader - A Windows App made in Flutter to download mp3 or mp4 from a Youtube video

youtube_downloader A Windows App made in Flutter to download mp3 or mp4 from a Y

Nov 30, 2022
Comments
  • error: 'PMLogUtils.h' file not found

    error: 'PMLogUtils.h' file not found

    新建项目引用插件项目,运行找不到:PMLogUtils.h 看了pub目录确实也没有 是什么原因呢?

    Error output from Xcode build: ↳ 2021-07-08 00:53:51.422 XCBBuildService[29013:1396731] Failed to remove: /Users/hello/Library/Developer/Xcode/DerivedData/Runner-hkqwhdmlksmxbugxhlcccjiqpatm/Build/Intermediates.noindex/XCBuildData/c7d0f3a8ccb88ddf929da29ca68f8a39-desc.xcbuild: unlink(/Users/hello/Library/Developer/Xcode/DerivedData/Runner-hkqwhdmlksmxbugxhlcccjiqpatm/Build/Intermediates.noindex/XCBuildData/c7d0f3a8ccb88ddf929da29ca68f8a39-desc.xcbuild): No such file or directory (2) ** BUILD FAILED **

    Xcode's output: ↳ /Users/hello/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.4.8/ios/Classes/core/PMPlugin.m:9:9: fatal error: 'PMLogUtils.h' file not found #import "PMLogUtils.h" ^~~~~~~~~~~~~~ 1 error generated. /Users/hello/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.4.8/ios/Classes/core/PMManager.m:6:9: fatal error: 'PHAsset+PHAsset_checkType.h' file not found #import "PHAsset+PHAsset_checkType.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. /Users/hello/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.4.8/ios/Classes/core/PHAsset+PHAsset_getTitle.m:9:9: fatal error: 'PHAsset+PHAsset_checkType.h' file not found #import "PHAsset+PHAsset_checkType.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. /Users/hello/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.4.8/ios/Classes/ImageScannerPlugin.m:5:9: fatal error: 'PMPlugin.h' file not found #import "PMPlugin.h" ^~~~~~~~~~~~ 1 error generated. /Users/hello/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/photo_manager-0.4.8/ios/Classes/core/ConvertUtils.m:6:9: fatal error: 'PHAsset+PHAsset_checkType.h' file not found #import "PHAsset+PHAsset_checkType.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Building targets in parallel note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete

    help wanted 
    opened by uewill 0
  • photo

    photo

    ./../../../flutter/.pub-cache/hosted/pub.flutter-io.cn/photo-0.5.0-dev.3/lib/src/ui/widget/check_box_copy.dart:216:31: Error: Type 'RenderToggleable' not found.

    need confirm 
    opened by LL2020 0
  • Fix: flutter 2 makes BuildContext generic method breaking change

    Fix: flutter 2 makes BuildContext generic method breaking change

    Flutter had made the BuildContext method inheritFromWidgetOfExactType generic. Instead dependOnInheritedWidgetOfExactType method should be used.

    It's a breaking change in flutter 2.

    Fix: #147

    Reference: https://github.com/flutter/flutter/pull/44189

    opened by hiwangzi 0
Releases(0.5.0-dev.1)
Owner
Caijinglong
from android to flutter. also know ios/react/flutter/python/golang
Caijinglong
Photo Finder - Online free simple photo library with flutter

photo_finder Photo_Finder Is a Online free simple photo library. Fully API Based

CPAD-Gazipur 2 Feb 9, 2022
Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or video from the device gallery, whether it is Android or iOS

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or vide

Phuong Vu 2 Oct 13, 2022
dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Md Abir Ahsan Tahmim 1 Dec 8, 2021
Flutter Plugin used to query audios/songs infos [title, artist, album, etc..] from device storage.

on_audio_query on_audio_query is a Flutter Plugin used to query audios/songs ?? infos [title, artist, album, etc..] from device storage. Help: Any pro

Lucas Josino 31 Dec 10, 2022
Flutter frontend for downloading free album and playlists (based on a YouTube URL) and uploading them to a Plex server.

Flutter frontend for downloading free album and playlists (based on a YouTube URL) and uploading them to a Plex server. (The project is currently in progress. There are some additional features and ideas I want to implement.)

null 1 Jan 9, 2022
Fifa world cup album manager - 8ª edition of Dart Week from Academia do Flutter

DartWeek 8ª edição - FIFA WORLD CUP album manager App para você gerir suas figurinhas da copa! Com o padrão de projeto MVP, usando SetState, Integraçã

Erilândio Santos Medeiros 4 Oct 17, 2022
Save image to album or sandbox

image_save Save image to album, support Android and iOS. Permission Android Add the following statement in AndroidManifest.xml: <uses-permission andro

Samoy 20 Nov 1, 2022
Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.

Agora UI Kit for Flutter Instantly integrate Agora video calling or video streaming into your Flutter application. Getting started Requirements An Ago

Agora.io Community 106 Dec 16, 2022
A Video Player For Vimeo Videos in Flutter. This plugin allows us to play video from Vimeo and it supports Android and iOS platforms.

vimeo_video_player A Video Player For Vimeo Videos in Flutter. This plugin allow us to play video from vimeo and it's supports Android and iOS platfor

MindInventory 26 Dec 8, 2022
Video game ui - Video Game App UI In Flutter!

video_game_ui A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Flutter Boy 11 Sep 6, 2022