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

A versatile color selection widget with Material, white, black, and hex support, including null/deselect options.

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);

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,
);

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,
    ]),
  ],
);

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 used to represent an individual Color.

FaabulColorSample presents the Color in a circle.

5
likes
0
pub points
69%
popularity

Publisher

verified publisherfaabul.com

A versatile color selection widget with Material, white, black, and hex support, including null/deselect options.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on faabul_color_picker