image_picker_ui 0.2.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 77

Image Picker Options #

import 'package:image_picker_ui/image_picker_handler.dart';


Pick image from GALLERY and CAMERA #

Add color theme #

Crop enable and disable option #


Android-If you going to user crop feature.

Add UCropActivity into your AndroidManifest.xml


0.2.2 #

  • Theme option updated.

0.1.2 #

  • Example format updated.

0.1.1 #

  • Crop image feature.

0.0.1 #

  • 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);,0xFFFFFFFF,false);

  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.2.0

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:image_picker_ui/image_picker_dialog.dart';
import 'package:image_picker_ui/image_picker_handler.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 Mar 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health issues and suggestions

Document public APIs. (-0.03 points)

29 out of 30 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.

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.bgColor, ImagePickerDialog.labelColor, ImagePickerDialog._drawerContentsOpacity, ImagePickerDialog._drawerDetailsPosition

Format lib/image_picker_handler.dart.

Run flutter format to format lib/image_picker_handler.dart.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (image_cropper, image_picker).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-16.16 points)

The package was last published 60 weeks ago.


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 1.2.1
image_picker ^0.5.0 0.5.4+3 0.6.4
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