Skip to content
On this page

ColorSwatchPicker

A collection of color swatches for choosing a color.

ColorSwatchPicker in FluttyUIColorSwatchPicker in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

ColorSwatchPicker

const ColorSwatchPicker({
  super.key,
  this.motion,
  this.colors = defaultColors,
  required this.selectedColor,
  required this.onChanged,
  this.size,
  this.dimension,
  this.swatchSize,
  this.spacing,
  this.checkColor = const Color(0xFFFFFFFF),
  this.checkIconSize,
  this.isDisabled = false,
});
ParameterTypeRequiredDefault
keyKey?Nonull
motionComponentMotion?Nonull
colorsList<Color>NodefaultColors
selectedColorColor?Yes—
onChangedValueChanged<Color>?Yes—
sizeComponentSize?Nonull
dimensiondouble?Nonull
swatchSizedouble?Nonull
spacingdouble?Nonull
checkColorColorNoconst Color(0xFFFFFFFF)
checkIconSizedouble?Nonull
isDisabledboolNofalse

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/controls/color_swatch_picker/color_swatch_picker.dart

This reference is generated from the ColorSwatchPicker declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI