flutter_colorpicker 0.0.1+1 copy "flutter_colorpicker: ^0.0.1+1" to clipboard
flutter_colorpicker: ^0.0.1+1 copied to clipboard

outdatedDart 1 only

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),
        ),
        actions: <Widget>[
            new FlatButton(
                child: new Text('Got it'),
                onPressed: () {
                    setState(() => currentColor = pickerColor);
                    Navigator.of(context).pop();
                },
            ),
        ],
    ),
)

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.

853
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