File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class FormBuilderColorPickerField extends FormBuilderField<Color> {
65
65
final EdgeInsets scrollPadding;
66
66
final bool enableInteractiveSelection;
67
67
final InputCounterWidgetBuilder ? buildCounter;
68
+ final List <Color > availableColors;
68
69
69
70
final Widget Function (Color ? )? colorPreviewBuilder;
70
71
@@ -112,6 +113,7 @@ class FormBuilderColorPickerField extends FormBuilderField<Color> {
112
113
this .buildCounter,
113
114
this .controller,
114
115
this .colorPreviewBuilder,
116
+ this .availableColors = const [],
115
117
}) : super (
116
118
key: key,
117
119
initialValue: initialValue,
@@ -261,6 +263,7 @@ class FormBuilderColorPickerFieldState
261
263
return BlockPicker (
262
264
pickerColor: value ?? Colors .transparent,
263
265
onColorChanged: _colorChanged,
266
+ availableColors: widget.availableColors,
264
267
);
265
268
default :
266
269
throw 'Unknown ColorPickerType' ;
You can’t perform that action at this time.
0 commit comments