image_picker_ui 0.1.2

  • Example
  • Installing
  • Versions
  • 80

Image Picker Options



  • Initial release.


import 'dart:io';
import 'package:flutter/material.dart';
import 'package:image_picker_ui/image_picker_handler.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return new MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Image picker',
      theme: new ThemeData(
        primaryColor: const Color(0xFF02BB9F),
        primaryColorDark: const Color(0xFF167F67),
        accentColor: const Color(0xFF167F67),
      home: new HomeScreen(title: 'Flutter Image picker'),

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

  _HomeScreenState createState() => new _HomeScreenState();

class _HomeScreenState extends State<HomeScreen>
    with TickerProviderStateMixin, ImagePickerListener {
  File _image;
  AnimationController _controller;
  ImagePickerHandler imagePicker;

  void initState() {
    _controller = new AnimationController(
      vsync: this,
      duration: const Duration(milliseconds: 500),

    imagePicker = new ImagePickerHandler(this, _controller);

  void dispose() {

  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(
          style: new TextStyle(color: Colors.white),
      body: new GestureDetector(
        onTap: () => imagePicker.showDialog(context),
        child: new Center(
          child: _image == null
              ? new Stack(
                  children: <Widget>[
                    new Center(
                      child: new CircleAvatar(
                        radius: 80.0,
                        backgroundColor: const Color(0xFF778899),
                    new Center(
                      child: new Image.asset("assets/photo_camera.png"),
              : new Container(
                  height: 160.0,
                  width: 160.0,
                  decoration: new BoxDecoration(
                    color: const Color(0xff7c94b6),
                    image: new DecorationImage(
                      image: new ExactAssetImage(_image.path),
                      fit: BoxFit.cover,
                    border: Border.all(color:, width: 5.0),
                        new BorderRadius.all(const Radius.circular(80.0)),

  userImage(File _image) {
    setState(() {
      this._image = _image;

Use this package as a library

1. Depend on it

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

  image_picker_ui: ^0.1.2

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:image_picker_ui/image_picker_dialog.dart';
import 'package:image_picker_ui/image_picker_handler.dart';
Version Uploaded Documentation Archive
0.1.2 Dec 9, 2018 Go to the documentation of image_picker_ui 0.1.2 Download image_picker_ui 0.1.2 archive
0.1.1 Dec 9, 2018 Go to the documentation of image_picker_ui 0.1.1 Download image_picker_ui 0.1.1 archive
0.0.1 Oct 25, 2018 Go to the documentation of image_picker_ui 0.0.1 Download image_picker_ui 0.0.1 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.

Health suggestions

Fix lib/image_picker_dialog.dart. (-0.50 points)

Analysis of lib/image_picker_dialog.dart reported 1 hint:

line 6 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: ImagePickerDialog._listener, ImagePickerDialog._controller, ImagePickerDialog.context, ImagePickerDialog._drawerContentsOpacity, ImagePickerDialog._drawerDetailsPosition

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
image_cropper ^0.0.9 0.0.9
image_picker ^0.4.10 0.4.12
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8