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

simple_progress_indicators 封面
插件详情v0.2.0

simple_progress_indicators

带有纯色和渐变的简单进度指示器包。可用于显示进度或进行简单动画。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
7010
喜欢数
40
Pub 分数
140

安装插件

flutter pub add simple_progress_indicators

插件介绍

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

一个轻量级的 Flutter 包,提供简单的进度指示器,支持实色和渐变。非常适合显示加载状态或在应用中创建微妙的动画效果。该包易于集成,并在多个平台上提供简洁、可自定义的视觉反馈。支持 Android、iOS、Web、macOS、Windows 和 Linux,适用于跨平台开发。专为寻求极简但高效进度可视化且无需复杂配置的开发者设计。

适合场景

  • 加载状态指示器
  • 动画进度显示
  • 简单用户界面反馈
  • 跨平台进度条
  • 可自定义的加载动画
  • 应用启动画面

主要特点

  • 纯色进度条
  • 渐变支持
  • 最小配置
  • 跨平台兼容性
  • 轻松集成
  • 轻量级大小

适合对象

  • 初学者 Flutter 开发者
  • 简单的应用界面
  • 加载用户体验优化
  • 快速原型设计
  • 需要轻量级指示器的应用程序
  • 表单或下载中的视觉反馈

使用建议

  • 有限的自定义选项
  • 无高级样式功能
  • 不适用于复杂动画
  • 适用于基本进度需求
  • 无内置的暂停/恢复控制
  • 依赖外部依赖管理

原始 README

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

Simple progress indicators package with solid colors and gradients. Can be used to show progress or for simple progress bar animation.

How it looks

Table of contents

Usage

Linear Progress indicator

ProgressBar

ProgressBar is a basic linear indicator widget. It's a Stateless Widget that produces basic horizontal rounded rectangle with optional background rounded rectangle underneath. Include it in your build method like:

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: ProgressBar(
            value: 0.5,
            //specify only one: color or gradient
            //color:Colors.red,
            gradient: LinearGradient(
              begin: Alignment.topLeft,
              end: Alignment.bottomRight,
              colors: [Colors.yellowAccent, Colors.deepOrange],
            ),
          ),
        ),
      ),
    );
  }

It has several configurable parameters:

  • value - current indicator value, where 0.0 is 0% progress, 1.0 is 100% progress
  • width - indicator width, defaults to 200.0
  • height - indicator height, defaults to 10.0
  • color - solid indicator fill color
  • gradient - gradient fill, accepts Gradient class
  • backgroundColor - solid indicator background color, defaults to transparent

Minimum working widget requires only a value and color OR gradient property. NOTE: Specifying both properties is not accepted.

ProgressBarAnimation

ProgressBarAnimation is a simple animating progress bar widget. It animates ProgressBar widget for a given duration. Animation starts at the time the widget is built.

It has several configurable parameters:

  • duration - 0% to 100% animation duration
  • width - indicator width, defaults to 200.0
  • height - indicator height, defaults to 10.0
  • color - solid indicator fill color
  • gradient - gradient fill, accepts Gradient class
  • backgroundColor - solid indicator background color, defaults to transparent
  • curve - animation curve, defaults to linear. For other curves check Curves
ProgressBarAnimation(  
  duration: const Duration(seconds: 2),  
  gradient: const LinearGradient(  
    colors: [  
      Colors.blue,  
      Colors.purple,  
    ],  
  ),  
  backgroundColor: Colors.grey.withOpacity(0.4),  
),
AnimatedProgressBar

AnimatedProgressBar is a ImplicitlyAnimatedWidget. It behaves like other flutter AnimatedFoo widgets. This animates value parameter changes for a given duration. Animation starts only when one (initial) value changes to other (final) value. See the example below.

It has several configurable parameters:

  • value - value widget animates to, need to be changed
  • duration - initial value to final value animation duration
  • width - indicator width, defaults to 200.0
  • height - indicator height, defaults to 10.0
  • color - solid indicator fill color
  • gradient - gradient fill, accepts Gradient class
  • backgroundColor - solid indicator background color, defaults to transparent
  • curve - animation curve, defaults to linear. For other curves check Curves
  • onEnd - callback to trigger additional actions (e.g. another animation) at the end of the current animation
AnimatedProgressBar(  
  value: full ? 1.0 : 0.0,  
  duration: const Duration(seconds: 3),  
  gradient: const LinearGradient(  
    colors: [  
      Colors.amber,  
      Colors.red,  
    ],  
  ),  
  backgroundColor: Colors.grey.withOpacity(0.4),  
),

For full demo check examples folder.

Animation demo

Additional information

For issues and animation ideas visit issues section on github homepage.

所属分类

源码仓库

使用此插件的项目