Skip to content
A flutter super fast Image provider from native✈️
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
android
example
ios
lib
.gitignore
.metadata
CHANGELOG.md
LICENSE
README.md
flutter_image_provider.iml
pubspec.yaml

README.md

photo_provider

Pub

从native端相册读取照片或生成照片缩略图(墙裂推荐)到flutter端。native端自带缓存以提高读取速度,目前仅支持照片。

Features

  • 权限判断及请求
  • 相册静态图片
  • 缩略图
  • 缓存
  • 视频
  • gif
  • 筛选指定日期

Getting Started

pubspec.yaml中添加依赖,并执行flutter packages get

dependencies:
    ...
    photo_provider: ^0.1.0

初始化api

PhotoProvider.init(); // 检查权限并初始化相册
PhotoProvider.getImagesCount(); // 获取相册大小
PhotoProvider.getImage(
    index,              // 获取相册中的第几张照片
    width: 300,         // 获取指定宽度(默认原图)
    height: 300,        // 获取指定高度(默认原图)
);

License

photo_provider is released under the MIT license. See LICENSE for details.

You can’t perform that action at this time.