Skip to content

simrat39/simple_color_picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple_color_picker

A simple material-ish color picker for flutter.

Preview

Example:

AlertDialog

showDialog(
    context: context,
    builder: (context) {
      return AlertDialog(
        contentPadding: EdgeInsets.zero,
        content: Container(
          height: MediaQuery.of(context).size.height * 0.55,
          width: MediaQuery.of(context).size.width * 0.35,
          child: SimpleColorPicker(
            height: MediaQuery.of(context).size.height * 0.55,
            onColorSelect: (color) {
              print(color);
              Navigator.of(context).pop();
            },
            onCancel: () {
              Navigator.of(context).pop();
            },
            initialColor: Color(0xffe50050),
          ),
        ),
      );
    }

Modal Bottom Sheet

showModalBottomSheet(
    context: context,
    builder: (context) {
      return SimpleColorPicker(
        height: MediaQuery.of(context).size.height * 0.55,
        onColorSelect: (color) {
          print(color);
          Navigator.of(context).pop();
        },
        onCancel: () {
          Navigator.of(context).pop();
        },
        initialColor: Color(0xffe50050),
      );
    },
),

About

A simple material-ish flutter color picker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published