Flutter Plugin for Selecting Images/videos From The android and IOS Image Library

Flutter Plugin for Selecting Images/videos From The android and IOS Image Library

Flutter plugin for selecting images/videos from the Android and iOS image library, and taking pictures/videos with the camera

images_picker

Flutter plugin for selecting images/videos from the Android and iOS image library, and taking pictures/videos with the camera

ios(10+): ZLPhotoBrowser

android(21+): PictureSelector

This plugin is learn from lisen87/image_pickers

Support

  • pick multiple images/videos from photo album (wechat style)
  • use camera to take image/video
  • crop images with custom aspectRatio
  • compress images with quality/maxSize
  • localizations currently support english,chinese,japanese(more for android)

Don't need to set localizations,the plugin will follow system

Install

For ios:

<key>NSCameraUsageDescription</key>
<string>Example usage description</string>
<key>NSMicrophoneUsageDescription</key>
<string>Example usage description</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Example usage description</string>

For 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" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

And,

images_picker: ^newest
import "package:images_picker/images_picker.dart";

Usage

  • simple picker image
Future getImage() async {
    List<Media> res = await ImagesPicker.pick(
      count: 3,
      pickType: PickType.image,
    );
// Media
// .path
// .thumbPath (path for video thumb)
// .size (kb)
}
  • simple open camera
ImagesPicker.openCamera(
  pickType: PickType.video,
  maxTime: 15, // record video max time
);
  • add gif support
ImagesPicker.pick(
  // ...
  gif: true, // default is true
);
  • add cropper (gif crop unsupported)
ImagesPicker.pick(
  // ...
  // when cropOpt isn't null, crop is enabled
  cropOpt: CropOption(
    aspectRatio: CropAspectRatio.custom,
    cropType: CropType.rect, // currently for android
  ),
);
  • add compress
ImagesPicker.pick(
  // ...
  // when maxSize/quality isn't null, compress is enabled
  quality: 0.8, // only for android
  maxSize: 500, // only for ios (kb)
);

All params

// for pick
int count = 1,
PickType pickType = PickType.image,
bool gif = true,
CropOption cropOpt,
int maxSize,
double quality,

// for camera
PickType pickType = PickType.image,
int maxTime = 15,
CropOption cropOpt,
int maxSize,
double quality,

TODO LIST.

  • save image/videos to Photo album
  • use custom themeColor

Download Details:

Author: chavesgu

Source Code: https://github.com/chavesgu/images_picker

flutter dart mobile-apps

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Google's Flutter 1.20 stable announced with new features - Navoki

Google has announced new flutter 1.20 stable with many improvements, and features, enabling flutter for Desktop and Web

Top 25 Flutter Mobile App Templates in 2020

Flutter has been booming worldwide from the past few years. While there are many popular mobile app development technologies out there, Flutter has managed to leave its mark in the mobile application development world. In this article, we’ve curated the best Flutter app templates available on the market as of July 2020.

Flutter App Development Trends 2020

As the new decade dawns upon us, a slew of technologies has been making a lot of noise to grab the developers’ attention. While native app development is going strong, the trade winds are now blowing towards going cross-platform.

How To Succeed In Mobile App Wireframe Design?

This article covers everything about mobile app wireframe design: what to do and what not, tools used in designing a mobile or web app wireframe, and more.

Top 10 Mobile App Development Companies in India

The mobile application scenario has been continually changing over the years. In recent years India has become a center for mobile app development companies. The increase of smartphones has instantly increased the requirements for these apps. Every year new technological trends occur due to contin