搜索插件、代码仓与 APP 分类

flutter_circle_color_picker 封面
插件详情v0.3.0

flutter_circle_color_picker

一个漂亮的圆形颜色选择器,用于 Flutter,可选择 HSL 颜色。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
299
喜欢数
71
Pub 分数
150

安装插件

flutter pub add flutter_circle_color_picker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个视觉上吸引人的圆形颜色选择器,适用于 Flutter,允许用户使用 HSL 颜色模型选择颜色。采用流畅的交互和简洁的设计,可无缝集成到需要直观颜色选择的应用程序中。该选择器支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,具有高度的通用性。它非常适合设计工具、主题自定义器或任何需要用户通过自然的圆形界面选择颜色的应用。

适合场景

  • 设计应用程序中的颜色选择
  • 主题自定义界面
  • 创意绘画或绘画工具
  • 用户个人资料颜色偏好
  • 交互式用户界面原型设计

主要特点

  • HSL 颜色模型支持
  • 基于拖动的圆形颜色选择
  • 跨平台兼容性
  • 流畅的动画和过渡
  • 可自定义外观
  • 响应式触摸和指针输入

适合对象

  • 开发创意或设计导向应用程序的开发者
  • 需要直观色彩选择的应用程序
  • 跨平台应用程序,具有统一的用户界面
  • UI/UX 设计师集成色彩工具

使用建议

  • 仅限 HSL 颜色空间(不包括 RGB 或其他模型)
  • 可能需要额外的样式以保持深色模式的一致性
  • 未针对非常大的颜色调色板进行优化
  • 依赖外部依赖项进行平台特定的渲染

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_circle_color_picker

pub package

A beautiful circle color picker for flutter. Online Demo

Light theme Dark Theme
sample light theme sample dark theme

Usage

...
        body: Center(
          child: CircleColorPicker(
            initialColor: Colors.blue,
            onChanged: (color) => print(color),
            size: const Size(240, 240),
            strokeWidth: 4,
            thumbSize: 36,
          ),
        ),
...

API

  /// Called during a drag when the user is selecting a color.
  ///
  /// This callback called with latest color that user selected.
  final ValueChanged<Color> onChanged;

  /// Called when drag ended.
  ///
  /// This callback called with latest color that user selected.
  final ValueChanged<Color>? onEnded;

  /// An object to controll picker color dynamically.
  ///
  /// Provide initialColor if needed.
  final CircleColorPickerController? controller;

  /// The size of widget.
  /// Draggable area is thumb widget is included to the size,
  /// so circle is smaller than the size.
  ///
  /// Default value is 280 x 280.
  final Size size;

  /// The width of circle border.
  ///
  /// Default value is 2.
  final double strokeWidth;

  /// The size of thumb for circle picker.
  ///
  /// Default value is 32.
  final double thumbSize;

  /// Text style config
  ///
  /// Default value is Black
  final TextStyle textStyle;

  /// Widget builder that show color code section.
  /// This functions is called every time color changed.
  ///
  /// Default is Text widget that shows rgb strings;
  final ColorCodeBuilder colorCodeBuilder;

所属分类

源码仓库

使用此插件的项目