https://github.com/simrat39/simple_color_picker
A simple material-ish flutter color picker
https://github.com/simrat39/simple_color_picker
Last synced: about 2 months ago
JSON representation
A simple material-ish flutter color picker
- Host: GitHub
- URL: https://github.com/simrat39/simple_color_picker
- Owner: simrat39
- License: gpl-3.0
- Created: 2020-10-08T22:31:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T06:26:43.000Z (over 5 years ago)
- Last Synced: 2025-01-16T06:29:23.452Z (over 1 year ago)
- Language: Dart
- Size: 485 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# simple_color_picker
A simple material-ish color picker for flutter.

# Example:
## AlertDialog
``` dart
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
``` dart
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),
);
},
),
```