image_picker_flutter 1.4.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 81

image_picker_flutter pub package

功能介绍 #

  • [x] 该插件目前支持IOS(8-13)、Android(16-29)
  • [x] 支持单选、多选
  • [x] 提供拍照、视频录制功能
  • [x] 支持多种图片格式PNG、JPG、GIF等,Flutter不支持的图片格式通过IOS、Android原生方法提供支持
  • [x] 支持多种视频格式,视频预览图通过IOS、Android原生方法提供支持
  • [x] 所用资源都提供File的绝对路径
  • [ ] 不支持原图预览
  • [ ] 不支持视频播放
  • [ ] 不支持IOS、Android动态权限、需要使用之前自行权限获取,建议使用permission_handler
  • [ ] ...

Demo动图(有那么点不清晰) #

image

使用说明 #

Android 必须添加Kotlin依赖 #

Ios 必须是Swift创建的项目 #

dependencies in flutter #


dependencies:
  image_picker_flutter: ^1.4.1
  

iOS 权限 #


<key>NSPhotoLibraryUsageDescription</key>
<string>使用图片</string>
<key>NSCameraUsageDescription</key>
<string>照相</string>
<key>NSMicrophoneUsageDescription</key>
<string>录音</string>

Android 权限 #


<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />

Demo 应用 #

Android APP #

IOS APP 因发布原因暂不提供、可以下载代码编译安装 #

API 介绍 #

  • ImagePicker
    • (单选)singlePicker
    • (多选)mulPicker
    • (拍照)takePicture
    • (视频录制)takeVideo

序言 #

- Flutter越做越强大!!!
- image_picker_flutter功能越来越完善!!!
- 开源加油!!!

1.4.1 #

example/README.md

image_picker_flutter_example #

Demonstrates how to use the image_picker_flutter 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:
  image_picker_flutter: ^1.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:image_picker_flutter/image_picker_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
62
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]
81
Learn more about scoring.

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

  • Dart: 2.6.0
  • 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/src/image/asset_data_image.dart.

Run flutter format to format lib/src/image/asset_data_image.dart.

Format lib/src/page/single_image_picker_page.dart.

Run flutter format to format lib/src/page/single_image_picker_page.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.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