Material ColorPicker
基于 Google Docs 颜色选择器的 Flutter 颜色选择器。
由 Andre Haueisen 提供的可高度配置的 Snackbar。
入门
您可以将其嵌入到您的 material app 中,或者像这样在 Dialog 中使用它
Future<Color> askedToLead() async => await showDialog(
context: context,
child: new SimpleDialog(
title: const Text('Select color'),
children: <Widget>[
new ColorPicker(
type: MaterialType.transparency,
onColor: (color) {
Navigator.pop(context, color);
},
currentColor: startColor,
),
],
),
);