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

pretty_gauge 封面
插件详情v1.0.1

pretty_gauge

适用于 Flutter 的完全可自定义仪表盘小部件,支持多个分段、颜色以及用于显示当前值和文本的可自定义样式

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
3680
喜欢数
22
Pub 分数
150

安装插件

flutter pub add pretty_gauge

插件介绍

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

Pretty Gauge 是一个高度可定制的 Flutter 小部件,专为通过支持多个分段、动态着色和丰富样式选项的仪表来可视化数据而设计。它允许开发者精确显示当前值和自定义文本,非常适合用于仪表板、性能指标或进度跟踪。该小部件完全响应式,可在 Android、iOS、Web、macOS、Windows 和 Linux 等所有主要平台上运行。通过直观的配置,它能增强用户界面,提供清晰且视觉上吸引人的数值数据表示。

适合场景

  • 仪表板小部件
  • 性能监控
  • 进度指示器
  • 应用中的数据可视化
  • 自定义仪表盘显示

主要特点

  • 多段支持
  • 可自定义颜色
  • 值和文本的样式
  • 响应式设计
  • 跨平台兼容性
  • 通过 pub 实现轻松集成

适合对象

  • 开发仪表板的开发者
  • 需要视觉度量的UI设计师
  • 需要进度可视化的应用
  • 跨平台应用程序
  • 自定义仪表组件

使用建议

  • 需要理解 Flutter 布局
  • 可能需要针对复杂的分段逻辑进行调整
  • 有限的内置动画
  • 最适合静态或平滑变化的值

原始 README

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

pretty_gauge

Fully customizable Gauge widget for Flutter

Installing:

In your pubspec.yaml, add the following dependency

dependencies:
  pretty_gauge: 1.0.0

Example Usage:

import 'package:pretty_gauge/pretty_gauge.dart';

PrettyGauge(
    gaugeSize: 200,
    segments: [
        GaugeSegment('Low', 20, Colors.red),
        GaugeSegment('Medium', 40, Colors.orange),
        GaugeSegment('High', 40, Colors.green),
    ],
    currentValue: 46,
    displayWidget: Text('Fuel in tank', style: TextStyle(fontSize: 12)),
),

Features:

  • Fully featured Gauge widget that is built from scratch
  • Can have any number of segments in the Gauge with different segment length and colors
  • Gauge can have any dimension (square dimension only) with any minimum and maximum value
  • Needle color can be customized
  • Display and Value widget can be customized, so that you can display what you want on the Gauge
  • Can turn on/off markers that display Min and Max value on the Gauge. You can even style these markers!

License:

This project is licensed under the BSD 2-Clause license - see the LICENSE file for details

所属分类

源码仓库

使用此插件的项目

暂无相关数据。