pickers 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 70

pickers #

pickers 支持本地图片多选,本地视频多选,支持将网络图片保存到相册,支持预览视频和预览图片功能

pickers Support picture selection, video multiple selection, support to save network pictures to albums, support preview video and preview picture function

Supported Platforms

  • Android
  • iOS

此插件(pickers)将不再更新,请查看 image_pickers image_pickers

image_pickers #

pickers How to Use #

# add this line to your dependencies
pickers: ^1.0.2
import 'package:pickers/pickers.dart';
import 'package:pickers/CorpConfig.dart';
import 'package:pickers/Media.dart';

///选择图片 select images
Future<void> selectImages() async {
    List<Media> _listImagePaths = await Pickers.pickerPaths(
              galleryMode: GalleryMode.image,
              selectCount: 2,
              showCamera: true,
              compressSize: 300,
              corpConfig: CorpConfig(enableCrop: true, width: 2, height: 1));
  }

///选择视频 select Videos
Future<void> selectVideos() async {
   List<Media> _listVideoPaths = await Pickers.pickerPaths(
          galleryMode: GalleryMode.video,
          selectCount: 5,
        );
  }
///预览图片 preview picture
Pickers.previewImage(_listImagePaths[index].path);

///预览视频 Preview video
Pickers.previewVideo(_listVideoPaths[index].path);
///保存图片到图库 Save image to gallery
Pickers.saveImageToGallery("http://i1.sinaimg.cn/ent/d/2008-06-04/U105P28T3D2048907F326DT20080604225106.jpg");

1.0.3 #

  • This plugin will not be updated anymore, please check the image_pickers plugin

1.0.2 #

  • Android i OS supports local language environment (Chinese or English)

1.0.1 #

  • Handling integration issues

1.0.0 #

  • Initial Open Sources
  • Support Android iOS
  • pickers Support picture selection, video multiple selection, support to save network pictures to albums, support preview video and preview picture function

example/README.md

pickers_example #

Demonstrates how to use the pickers plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  pickers: ^1.0.3

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:pickers/pickers.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Dec 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/CorpConfig.dart.

Run flutter format to format lib/CorpConfig.dart.

Format lib/Media.dart.

Run flutter format to format lib/Media.dart.

Format lib/pickers.dart.

Run flutter format to format lib/pickers.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test