flutter_colorpicker 0.0.6 copy "flutter_colorpicker: ^0.0.6" to clipboard
flutter_colorpicker: ^0.0.6 copied to clipboard

outdated

A HSV color picker for your flutter app.

flutter_colorpicker #

pub package

A HSV color picker for your flutter app.

Getting Started #

Installation #

Add this to your pubspec.yaml (or create it):

dependencies:
  flutter_colorpicker: any

Then run the flutter tooling:

flutter packages get

Or upgrade the packages with:

flutter packages upgrade

Example #

Use it in [showDialog] widget:

// create some value
Color pickerColor = new Color(0xff443a49);
Color currentColor = new Color(0xff443a49);
ValueChanged<Color> onColorChanged;

// bind some values with [ValueChanged<Color>] callback
changeColor(Color color) {
    setState(() => pickerColor = color);
}

// raise the [showDialog] widget
showDialog(
    context: context,
    child: new AlertDialog(
        title: const Text('Pick a color!'),
        content: new SingleChildScrollView(
            child: new ColorPicker(
                pickerColor: pickerColor,
                onColorChanged: changeColor,
                enableLabel: true,
                pickerAreaHeightPercent: 0.8,
            ),
        ),
        actions: <Widget>[
            new FlatButton(
                child: new Text('Got it'),
                onPressed: () {
                    setState(() => currentColor = pickerColor);
                    Navigator.of(context).pop();
                },
            ),
        ],
    ),
)

preview

Details in example/ folder.

I have created the ColorPicker widget so you can use the color picker out of the box. But you can create your own style with the CustomPaint.

932
likes
0
pub points
99%
popularity

Publisher

unverified uploader

A HSV color picker for your flutter app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_colorpicker