This package will support all native color pickers shipped with the current OS.
Actually only works on iOS 14 and above.
- Create a
FlutterNativeColorpicker
instance:
final picker = FlutterNativeColorpicker();
- Simply open the color picker by run the following static method: (origin must be a valid Rect -> see full example for help)
picker.open(origin);
This just opens the color picker but does not listen for color input.
- To listen to inputs start a listener:
listener = picker.startListener((col) {
setState(() {
_color = col;
});
});
Important: Please make sure to cancel the listener when disposing the view!
@override
void dispose() {
listener.cancel();
super.dispose();
}