flutter_facebook_image_picker 0.0.13

  • Readme
  • Changelog
  • Example
  • Installing
  • 59

flutter_facebook_image_picker #

Flutter plugin that allows you to display Facebook multi image picker on iOS and Android.

pub package

Flutter Facebook Image Picker

Getting started #

This plugins displays a gallery with user's Facebook Albums and Photos, based on the access token provided. The plugin does not handle authorozation and login by itelf. In order to do that and provide access token you can use a plugin like flutter_facebook_login, and then just provide the access token to the gallery.


  • [ ] Improve docs
  • [x] Add screenshots
  • [ ] Min/Max option
  • [x] Image loading indicators
  • [ ] Custom background colors

License #

MIT © Radoslav Vitanov

Change Log #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Changed (v0.0.13) #

2018-09-01 #

Added #

  • Added image loading indicators
  • Updated README.md

Changed (v0.0.12) #

2018-08-30 #

Changed #

  • Removed obsolete debounce dependecy

Changed (v0.0.11) #

2018-08-30 #

Added #

  • Initial release


import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_facebook_image_picker/model/photo.dart';
import 'package:flutter_facebook_login/flutter_facebook_login.dart';
import 'package:flutter_facebook_image_picker/flutter_facebook_image_picker.dart';

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

class MyApp extends StatefulWidget {
  // This widget is the root of your application.
  MyAppState createState() {
    return new MyAppState();

class MyAppState extends State<MyApp> {
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      home: new MyHomePage(title: 'Flutter Demo Home Page'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => new _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  static final FacebookLogin facebookSignIn = new FacebookLogin();
  List<Photo> _photos = [];
  String _accessToken;
  String _error;

  Future<Null> _login() async {
    final FacebookLoginResult result =
        await facebookSignIn.logInWithReadPermissions(['user_photos']);

    switch (result.status) {
      case FacebookLoginStatus.loggedIn:
        final FacebookAccessToken accessToken = result.accessToken;
        setState(() {
          _accessToken = accessToken.token;

                builder: (_) => FacebookImagePicker(
                      onDone: (items) {
                        setState(() {
                          _error = null;
                          _photos = items;
                      onCancel: () => Navigator.pop(context),
      case FacebookLoginStatus.cancelledByUser:
        setState(() {
          _error = 'Login cancelled by the user.';

      case FacebookLoginStatus.error:
        setState(() {
          _error = 'Something went wrong with the login process.\n'
              'Here\'s the error Facebook gave us: ${result.errorMessage}';

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: new Text(widget.title),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
            child: new Center(
              // Center is a layout widget. It takes a single child and positions it
              // in the middle of the parent.
              child: MaterialButton(
                onPressed: () => _login(),
                color: Colors.blue,
                child: Text(
                  "Pick images",
                  style: TextStyle(
                    color: Colors.white,
          _error != null ? Text(_error) : null,
            child: GridView.count(
              crossAxisCount: 3,
              children: List.generate(_photos.length, (index) {
                return Image.network(_photos[index].source);
        ].where((o) => o != null).toList(),

Use this package as a library

1. Depend on it

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

  flutter_facebook_image_picker: ^0.0.13

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:flutter_facebook_image_picker/flutter_facebook_image_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 Nov 15, 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


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (http).

Package is getting outdated. (-20.55 points)

The package was last published 62 weeks ago.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
http ^0.11.3+16 0.11.3+17 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7 1.1.8
path 1.6.4
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies