color_picker_palette 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 30

color_picker_palette 0.1.3 #

A color picker palette with custom colors.

Usage #

Using color_picker_palette you can provide user with list of custom colors to choose.

It will show a horizontal list of colors including a button to add custom colors for user.

Long press will remove color from the list.

You can refer color_picker_palette/example

  colorPickerPalette = new ColorPickerPalette(
    size: 30.0,
    onChange: setColorState,
    colors: colors,
    buttonType: ButtonType.circular,
  setColorState() {
    setState(() {
      color = colorPickerPalette.color();

Contributing #

We encourage you contribute to color_picker_palette flutter package.

License #

color_picker_palette is released under MIT License

0.1.3 #

  • Initial release


import 'package:flutter/material.dart';
import 'package:color_picker_palette/color_picker_palette.dart';

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

class MyApp extends StatefulWidget {
  State<StatefulWidget> createState() => MyAppState();

class MyAppState extends State<MyApp> {
  ColorPickerPalette colorPickerPalette;
  Color color;
  List<Color> colors = [];

  void initState() {
    color = colors[0];
    colorPickerPalette = new ColorPickerPalette(
      size: 30.0,
      onChange: setColorState,
      colors: colors,
      buttonType: ButtonType.circular,

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: color,
          title: Text(
            'Color Picker Palette',
            style: TextStyle(color: Color(color.value - 10010110)),
        body: new Container(
          constraints: BoxConstraints.expand(),
          color: color,
          child: new Column(
            children: <Widget>[
                padding: EdgeInsets.all(16.0),
                child: Text(
                  style: TextStyle(
                    fontSize: 24.0,
                    fontWeight: FontWeight.w400,

  setColorState() {
    setState(() {
      color = colorPickerPalette.color();

Use this package as a library

1. Depend on it

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

  color_picker_palette: ^0.1.3

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:color_picker_palette/color_picker_palette.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 Jul 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [color_picker_palette] that is in a package requiring null.

Health issues and suggestions

Fix lib/picker_widget.dart. (-5.48 points)

Analysis of lib/picker_widget.dart reported 1 warning, 1 hint:

line 207 col 16: The parameter 'backgroundCursorColor' is required.

line 105 col 3: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance suggestions

Package is getting outdated. (-76.71 points)

The package was last published 92 weeks ago.

The package description is too short. (-19 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 Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies