colorOrNull method

Color? colorOrNull({
  1. required String label,
  2. Color? initialValue,
  3. ColorSpace initialColorSpace = ColorSpace.hex,
  4. String? description,
})

Creates a color picker that can be used to select a color.

Implementation

Color? colorOrNull({
  required String label,
  Color? initialValue,
  ColorSpace initialColorSpace = ColorSpace.hex,
  String? description,
}) {
  return onKnobAdded(
    ColorKnob.nullable(
      label: label,
      initialValue: initialValue,
      initialColorSpace: initialColorSpace,
      description: description,
    ),
  );
}