flutter_colorpicker 0.2.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 98

flutter_colorpicker #

pub package

A HSV color picker inspired by chrome devtools and a material color picker for your flutter app.

Getting Started #

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  flutter_colorpicker: any

Then run the flutter tooling:

flutter packages get

Or upgrade the packages with:

flutter packages upgrade

Example #

Use it in [showDialog] widget:

// create some value
Color pickerColor = Color(0xff443a49);
Color currentColor = Color(0xff443a49);
ValueChanged<Color> onColorChanged;

// bind some values with [ValueChanged<Color>] callback
changeColor(Color color) {
  setState(() => pickerColor = color);
}

// raise the [showDialog] widget
showDialog(
  context: context,
  child: AlertDialog(
    title: const Text('Pick a color!'),
    content: SingleChildScrollView(
      child: ColorPicker(
        pickerColor: pickerColor,
        onColorChanged: changeColor,
        enableLabel: true,
        pickerAreaHeightPercent: 0.8,
      ),
      // Use Material color picker
      // child: MaterialPicker(
      //   pickerColor: pickerColor,
      //   onColorChanged: changeColor,
      //   enableLabel: true, // only on portrait mode
      // ),
      //
      // Use Block color picker
      // child: BlockPicker(
      //   pickerColor: currentColor,
      //   onColorChanged: changeColor,
      // ),
    ),
    actions: <Widget>[
      FlatButton(
        child: Text('Got it'),
        onPressed: () {
          setState(() => currentColor = pickerColor);
          Navigator.of(context).pop();
        },
      ),
    ],
  ),
)

preview

01 02 03 04 05

Details in example/ folder.

CHANGELOG #

[0.2.1]

  • Rename some types.

[0.2.0]

  • A new block color picker.
  • Update example app.

[0.1.0]

  • Improve slider dragging.
  • A new material color picker.
  • Update example app.

[0.0.7]

  • Fix analysis warning.

[0.0.6]

  • Better landscape view.

[0.0.5]

  • Replace some deprecated functions.
  • Bump SDK version.

[0.0.4]

  • Replace a parameter from colorPainterHeight to pickerAreaHeightPercent to give a ratio on the picker area.

[0.0.3]

  • Optimization for responsive design.

[0.0.2]

  • Change widget's width.

[0.0.1+1]

  • Update readme.

[0.0.1]

  • Initial release.

example/README.md

flutter_colorpicker_example #

Demonstrates how to use the flutter_colorpicker plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_colorpicker: ^0.2.1

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_colorpicker/flutter_colorpicker.dart';
  
Version Uploaded Documentation Archive
0.2.4 May 19, 2019 Go to the documentation of flutter_colorpicker 0.2.4 Download flutter_colorpicker 0.2.4 archive
0.2.3 Apr 2, 2019 Go to the documentation of flutter_colorpicker 0.2.3 Download flutter_colorpicker 0.2.3 archive
0.2.2 Mar 7, 2019 Go to the documentation of flutter_colorpicker 0.2.2 Download flutter_colorpicker 0.2.2 archive
0.2.1 Jan 13, 2019 Go to the documentation of flutter_colorpicker 0.2.1 Download flutter_colorpicker 0.2.1 archive
0.2.0 Jan 9, 2019 Go to the documentation of flutter_colorpicker 0.2.0 Download flutter_colorpicker 0.2.0 archive
0.1.0 Oct 8, 2018 Go to the documentation of flutter_colorpicker 0.1.0 Download flutter_colorpicker 0.1.0 archive
0.0.7 Aug 20, 2018 Go to the documentation of flutter_colorpicker 0.0.7 Download flutter_colorpicker 0.0.7 archive
0.0.6 Aug 20, 2018 Go to the documentation of flutter_colorpicker 0.0.6 Download flutter_colorpicker 0.0.6 archive
0.0.5 May 24, 2018 Go to the documentation of flutter_colorpicker 0.0.5 Download flutter_colorpicker 0.0.5 archive
0.0.4 Mar 12, 2018 Go to the documentation of flutter_colorpicker 0.0.4 Download flutter_colorpicker 0.0.4 archive

All 14 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
95
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
98
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
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