CustomColorPicker<T> typedef
CustomColorPicker<T> =
ReactiveCustomWidget<Widget> ? Function(T editorState, Stream rebuildStream, Color currentColor, void setColor(Color color))
A typedef for creating a ReactiveCustomWidget that includes a custom color picker.
T
- The type representing the editor state.editorState
- The current state of the editor.rebuildStream
- A Stream that triggers the widget to rebuild.currentColor
- The currently selected color.setColor
- A function to update the selected color.
Returns an optional ReactiveCustomWidget that provides a custom color picker.
Example: colorPicker: (editor, rebuildStream, currentColor, setColor) => ReactiveCustomWidget( stream: rebuildStream, builder: (_) => BarColorPicker( configs: editor.configs, length: 200, horizontal: false, initialColor: currentColor, colorListener: (int value) { setColor(Color(value)); }, ), ),
Implementation
typedef CustomColorPicker<T> = ReactiveCustomWidget? Function(
T editorState,
Stream rebuildStream,
Color currentColor,
void Function(Color color) setColor,
);