flutter_facebook_image_picker 0.0.13

  • README.md
  • Example
  • Installing
  • Versions
  • 48


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


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)



  • Added image loading indicators
  • Updated README.md

Changed (v0.0.12)



  • Removed obsolete debounce dependecy

Changed (v0.0.11)



  • 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 packages get

Alternatively, your editor might support flutter packages 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';
Version Uploaded Documentation Archive
0.0.13 Sep 1, 2018 Go to the documentation of flutter_facebook_image_picker 0.0.13 Download flutter_facebook_image_picker 0.0.13 archive
0.0.12 Aug 30, 2018 Go to the documentation of flutter_facebook_image_picker 0.0.12 Download flutter_facebook_image_picker 0.0.12 archive
0.0.11 Aug 30, 2018 Go to the documentation of flutter_facebook_image_picker 0.0.11 Download flutter_facebook_image_picker 0.0.11 archive
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 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.10
  • Flutter: 1.1.7


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

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

While there is nothing inherently wrong with versions of 0.0.*, it usually means 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+1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.2
sky_engine 0.0.99
source_span 1.5.1
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies