flex_color_picker library

A customizable Flutter primary, accent and custom color picker. Includes an optional HSV wheel color picker.

Classes

ColorCodeField
Color code entry and display field used by the FlexColorPicker.
ColorIndicator
A Material widget used as a color indicator and color selector by the FlexColorPicker package's ColorPicker widget.
ColorPicker
A customizable Material primary color, accent color and custom colors, color picker.
ColorPickerActionButtons
Defines the FlexColorPicker OK and Cancel actions buttons and their style.
ColorPickerCopyPasteBehavior
Used by FlexColorPicker to define how copy-paste operations behave.
ColorTools
Static color tool functions used internally by FlexColorPicker.
ColorWheelPicker
A HSV color wheel based color picker for Flutter, used by FlexColorPicker.

Enums

ColorPickerActionButtonOrder
Used to define the order of OK and Cancel buttons on the FlexColorPicker dialog.
ColorPickerActionButtonType
Type of button used for OK or Cancel action button on a FlexColorPicker dialog.
ColorPickerCopyFormat
Enum that controls the RGB string format of the copied color value.
ColorPickerType
Enum that represents the different offered color picker types.

Extensions

FlexPickerNoNullColorExtensions on Color
Extensions on non nullable Color to return it's color value as strings.
FlexPickerNoNullStringExtensions on String
Extensions on String.
FlexPickerNullableStringExtensions on String?
Extensions on String.

Functions

showColorPickerDialog(BuildContext context, Color color, {Map<ColorPickerType, bool> pickersEnabled = const <ColorPickerType, bool>{ColorPickerType.both : false, ColorPickerType.primary : true, ColorPickerType.accent : true, ColorPickerType.bw : false, ColorPickerType.custom : false, ColorPickerType.wheel : false}, bool enableShadesSelection = true, bool includeIndex850 = false, bool enableTonalPalette = false, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, EdgeInsetsGeometry padding = const EdgeInsets.all(16), double columnSpacing = 8, double? toolbarSpacing, double? shadesSpacing, bool enableOpacity = false, double opacityTrackHeight = 36, double? opacityTrackWidth, double opacityThumbRadius = 16, ColorPickerActionButtons actionButtons = const ColorPickerActionButtons(), ColorPickerCopyPasteBehavior copyPasteBehavior = const ColorPickerCopyPasteBehavior(), IconData selectedColorIcon = Icons.check, double width = 40.0, double height = 40.0, bool tonalColorSameSize = false, double spacing = 4, double runSpacing = 4, double elevation = 0, bool hasBorder = false, double? borderRadius, Color? borderColor, double wheelDiameter = 190, double wheelWidth = 16, double wheelSquarePadding = 0, double wheelSquareBorderRadius = 4, bool wheelHasBorder = false, Widget? title, Widget? heading, Widget? subheading, Widget? tonalSubheading, Widget? wheelSubheading, Widget? recentColorsSubheading, Widget? opacitySubheading, bool showMaterialName = false, TextStyle? materialNameTextStyle, bool showColorName = false, TextStyle? colorNameTextStyle, bool showColorCode = false, bool colorCodeHasColor = false, TextStyle? colorCodeTextStyle, TextStyle? colorCodePrefixStyle, bool colorCodeReadOnly = false, bool showColorValue = false, bool showRecentColors = false, int maxRecentColors = 5, List<Color> recentColors = const <Color>[], bool enableTooltips = true, Color? selectedPickerTypeColor, TextStyle? pickerTypeTextStyle, Map<ColorPickerType, String> pickerTypeLabels = const <ColorPickerType, String>{ColorPickerType.primary : ColorPicker._selectPrimaryLabel, ColorPickerType.accent : ColorPicker._selectAccentLabel, ColorPickerType.bw : ColorPicker._selectBlackWhiteLabel, ColorPickerType.both : ColorPicker._selectBothLabel, ColorPickerType.custom : ColorPicker._selectCustomLabel, ColorPickerType.wheel : ColorPicker._selectWheelAnyLabel}, Map<ColorSwatch<Object>, String> customColorSwatchesAndNames = const <ColorSwatch<Object>, String>{}, Map<ColorSwatch<Object>, String> customSecondaryColorSwatchesAndNames = const <ColorSwatch<Object>, String>{}, Widget? dialogTitle, EdgeInsetsGeometry titlePadding = EdgeInsets.zero, TextStyle? titleTextStyle, EdgeInsetsGeometry contentPadding = EdgeInsets.zero, EdgeInsetsGeometry? actionsPadding, EdgeInsetsGeometry? buttonPadding, Color? backgroundColor, double? dialogElevation, Color? shadowColor, Color? surfaceTintColor, String? semanticLabel, EdgeInsets insetPadding = const EdgeInsets.symmetric(horizontal: 40, vertical: 24), Clip clipBehavior = Clip.none, ShapeBorder? shape, bool barrierDismissible = true, Color barrierColor = Colors.black12, String? barrierLabel, bool useSafeArea = true, RouteSettings? routeSettings, Offset? anchorPoint, RouteTransitionsBuilder? transitionBuilder, Duration transitionDuration = const Duration(milliseconds: 200), BoxConstraints? constraints}) Future<Color>
Define a color picker, show its dialog and wait for it to return a color.