faabul_color_picker 1.1.0 copy "faabul_color_picker: ^1.1.0" to clipboard
faabul_color_picker: ^1.1.0 copied to clipboard

A simple color picker with focus on good UX. Work with Material colors and parses custom colors in hex format.

faabul_color_picker #

Sample image faabul_color_picker is developed and used by Faabul Live Quizzes

Getting Started #

Call showColorPickerDialog() to show the color picker dialog and await the result.

final color = await showColorPickerDialog(context: context);
copied to clipboard

In most cases you want to specify the currently selected color. If you want to allow the user to unselect the color, set allowUnselectButton to true.

final color = await showColorPickerDialog(
  context: context,
  selected: selectedColor,
  allowUnselectButton: true,
);
copied to clipboard

Custom colors #

If you want to use custom colors, pass them to the colors parameter.

final color = await showColorPickerDialog(
  context: context,
  selected: selectedColor,
  colors: [
    FaabulColorShades(color: Colors.red, shades: [
       Colors.red,
       Colors.redAccent,
    ]),
    FaabulColorShades(color: Colors.green, shades: [
       Colors.lightGreen,
       Colors.green,
       Colors.lightGreenAccent,
       Colors.greenAccent,
    ]),
    FaabulColorShades(color: Colors.blue, shades: [
        Colors.lightBlue,
        Colors.blue,
        Colors.lightBlueAccent,
        Colors.blueAccent,
    ]),
  ],
);
copied to clipboard

Other exposed classes #

FaabulColorPicker is the widget that shows inside the showColorPickerDialog. It can be used directly if you want to select the color in a different way.

FaabulColorButton is the button widget used to represent an individual Color.

FaabulColorSample is a widget that presents the Color as a circle.

6
likes
150
points
78
downloads
screenshot

Publisher

verified publisherfaabul.com

Weekly Downloads

2024.07.08 - 2025.01.20

A simple color picker with focus on good UX. Work with Material colors and parses custom colors in hex format.

Homepage
Repository (GitHub)
View/report issues

Topics

#ui #picker #color #widget

Documentation

API reference

License

MIT (license)

Dependencies

faabul_color_conversion, flutter

More

Packages that depend on faabul_color_picker