medias_picker 0.1.3+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

Medias Picker #

pub package

A Flutter plugin for IOS and Android providing a simple way to get multiple pictures and videos.

Features: #

  • Get multiple pictures and videos.
  • Compress images.

Installation #

First, add medias_picker as a dependency in your pubspec.yaml file.

Android #

You need to add these styles to the android app (app/src/main/values/styles.xml).

  <style name="LibAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
      <!-- Customize your theme here. -->
      <item name="colorPrimary">@color/colorPrimary</item>
      <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
      <item name="colorAccent">@color/colorAccent</item>
      <item name="android:colorBackground">@android:color/background_light</item>
      <item name="android:windowBackground">@android:color/white</item>

  <style name="PickerTabLayout" parent="Widget.Design.TabLayout">
      <item name="tabBackground">@color/colorPrimary</item>
      <item name="tabGravity">fill</item>
      <item name="tabMaxWidth">0dp</item>

  <style name="SmoothCheckBoxStyle">
      <item name="color_checked">@color/checkbox_color</item>
      <item name="color_unchecked">@android:color/white</item>
      <item name="color_unchecked_stroke">@color/checkbox_unchecked_color</item>
      <item name="color_tick">@android:color/white</item>

And need to add the camera permisson. (android/app/src/main/AndroidManifest.xml).

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

iOS #

Set the minimum version to 9.0 and add if not exists one row to the ios/podfile after target runner:

platform :ios, '9.0'


target 'Runner' do


Example #

Here is an example flutter app displaying how to use the MediasPicker.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:medias_picker/medias_picker.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  List<String> mediaPaths;

  void _getImages() async {
    mediaPaths = await MediasPicker.pickImages(
      quantity: 7,
      maxWidth: 1024,
      maxHeight: 1024,
      quality: 85,

    if (!mounted) return;
    setState(() {});
  void _getVideos() async {
      mediaPaths = await MediasPicker.pickVideos(quantity: 7);
      if (!mounted) return;
      setState(() {});

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Plugin example app'),
        body: Center(
          child: Column(
            children: <Widget>[
                child: Text('Get images'),
                onPressed: _getImages,
                child: Text('Get videos'),
                onPressed: _getVideos,
              if (mediaPaths != null)

Feedback welcome and Pull Requests are most welcome!

[0.1.3+1] - 18/09/2019.

Remove unused codes and improve description

[0.1.3] - 11/09/2019.

BREAKING CHANGE: Migrate to AndroidX


  • Initial release.


medias_picker_example #

Demonstrates how to use the medias_picker plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

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

  medias_picker: ^0.1.3+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:medias_picker/medias_picker.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

9 out of 9 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.


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.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
pedantic ^1.8.0+1