v1.0.0cyclop
一个实验性的 Flutter 颜色选择器,带有可选的吸管工具(Material 颜色调色板、AHSL、ARGB 和自定义调色板库)
57喜欢 4200近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
带有吸管工具、HSL、RGB 和 Material 颜色的 Flutter 色板
以下为英文项目原文快照,最新内容请访问 GitHub。
A flutter colorpicker with an eyedropper tool. Works on mobile, desktop & web ( CanvasKit)
| Desktop & tablet | Mobile |
|---|---|
![]() |
![]() |
| Material | HSL | RVB | Custom |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Light theme | Dark theme |
|---|---|
![]() |
![]() |
Select a color from your Flutter mobile or desktop screen.
To use the eyedropper you need to wrap the app in the EyeDrop widget.
@override
Widget build(BuildContext context) {
return EyeDrop(
child: Builder(
builder: (context) => Scaffold(
backgroundColor: backgroundColor,
body: Container(
child: ColorButton(
key: Key('c1'),
color: color1,
config: ColorPickerConfig(enableEyePicker = true),
size: 32,
elevation: 5,
boxShape: BoxShape.rectangle, // default : circle
swatches: swatches,
onColorChanged: (value) => setState(() => color1 = value),
),
),
),
),
);
}
ColorButton(
key: Key('c1'),
color: color1,
config: ColorPickerConfig(
this.enableOpacity = true,
this.enableLibrary = false,
this.enableEyePicker = true,
),
boxShape: BoxShape.rectangle, // default : circle
size: 32,
swatches: swatches,
onColorChanged: (value) => setState( () => color1 = value ),
);
ColorButton(
key: Key('c2'),
color: color2,
config: ColorPickerConfig(enableEyePicker: false),
size: 64,
swatches: swatches,
onColorChanged: (value) => setState( () => color2 = value ),
onSwatchesChanged: (newSwatches) => setState(() => swatches = newSwatches),
);
依赖清单 6 项
{"sdk":"flutter"}^4.1.3^3.2.1^0.10.0{"sdk":"flutter"}^2.0.3先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗