flutter_material_color_picker 0.0.4

  • README.md
  • Installing
  • Versions
  • 84

Flutter Material Color Picker

Material Color picker is a Flutter widget, that can be customizable.

By default, it's Material Colors, but you can define your own colors.

You can also use CircleColor widget to display color in your app. Example, you can set the color picker in a dialog and display the selected color in a ListTile, for settings.

How to use it

These examples use a static color for 'selectedColor', but you can use a variable (state)

Add to your Flutter project

You just need to add introduction_screen as a dependency in your pubspec.yaml file.

flutter_material_color_picker: ^0.0.3+1


import 'package:flutter_material_color_picker/flutter_material_color_picker.dart';


    onColorChange: (Color color) {
        // Handle color changes
    selectedColor: Colors.red

Listen main color changes

    onColorChange: (Color color) {
        // Handle color changes
    onMainColorChange: (ColorSwatch color) {
        // Handle main color changes
    selectedColor: Colors.red

Custom colors

In this example, custom colors are a list of Material Colors (class who extend of ColorSwatch). But you can create your own list of ColorSwatch.

    onColorChange: (Color color) {
        // Handle color changes
    selectedColor: Colors.red,
    colors: [


Color selection

There is two step, first choose the main color, and when you press it, you have to choose a shade of the main color. By default it's all Material Colors, but you can define custom colors, a list of ColorSwatch.

Example of usages

You can insert the color picker into a Dialog

Display color

You can use CircleColor widget, to display the selected color into your settings for example.


  • Fix icon on selected color
  • Force icon's color (if light color set black icon, and if dark color set white icon)


  • Edit README


  • Improve design (use GridView)
  • Add (customizable) icon on CircleColor when selected


  • Add support of ColorSwatch and not MaterialColor
  • Fix bug of colors null
  • Fix bug if you just press main color, and not shade color, the change event not called
  • Improve code


  • Initial release

Use this package as a library

1. Depend on it

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

  flutter_material_color_picker: ^0.0.4

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_material_color_picker/flutter_material_color_picker.dart';
Version Uploaded Documentation Archive
0.0.4 Sep 10, 2018 Go to the documentation of flutter_material_color_picker 0.0.4 Download flutter_material_color_picker 0.0.4 archive
0.0.3+1 Sep 10, 2018 Go to the documentation of flutter_material_color_picker 0.0.3+1 Download flutter_material_color_picker 0.0.3+1 archive
0.0.3 Sep 10, 2018 Go to the documentation of flutter_material_color_picker 0.0.3 Download flutter_material_color_picker 0.0.3 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

Format lib/flutter_material_color_picker.dart.

Run flutter format to format lib/flutter_material_color_picker.dart.

Format lib/src/colors.dart.

Run flutter format to format lib/src/colors.dart.

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use flutter_material_color_picker.dart.

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.58.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
Dev dependencies