Giter Site home page Giter Site logo

abdelrahmanaymen / flutter_instagram_image_picker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kfiross/flutter_instagram_image_picker

0.0 0.0 0.0 4.36 MB

A Flutter package for picking images from Instagram

License: BSD 3-Clause "New" or "Revised" License

Dart 96.47% Kotlin 1.74% Swift 1.64% Objective-C 0.15%

flutter_instagram_image_picker's Introduction

flutter_instagram_image_picker

A Flutter package for picking images from Instagram

Getting Started

This plugin displays a gallery with user's Instagram Albums and Photos, based on the access token provided. It does handle authorization and login by itself.
Then just provides access data (userId+SessionKey) to the gallery.

Usage

1.Check if user has logged in, if not prompt him to enter his login data using by navigation to the InstagramLoginPage

bool isLogged = await InstagramAuth().isLogged;
// check if user already logged in, if not log the user
if (!isLogged) {
  bool loginStatus = await InstagramAuth().signUserIn(context);

  // if user canceled the operation
  if (!loginStatus)
    return;
}

2.Check if the user logged in successfully by accessing his data.

final accessMapData = await InstagramAuth().accessData;
if(accessMapData == null){
  return null;
}

3.After we got the access data, we can navigate to InstagramImagePicker:

Navigator.push(
  context,
  MaterialPageRoute(
    builder: (context) => InstagramImagePicker(
      accessMapData,
      showLogoutButton: true,
      onDone: (photos) {
        // photos are the photos you selected in the picker
        // each one has the url
        Navigator.pop(context);
      },
      onCancel: () => Navigator.pop(context),
    ),
  ),
);
,

Screenshots

  • Login Page:

  • Image Picker:

  • Image Picker (after selection):

flutter_instagram_image_picker's People

Contributors

kfiross avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.