Last updated:
0 purchases
faabul color picker
faabul_color_picker #
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.