ExtDouble extension
功能特性 / Features
- 📊 支持水平进度显示 / Horizontal progress display
- 🎨 支持线性渐变色 / Linear gradient support
- ✨ 支持动画效果 / Animation support
- 🎯 支持自定义指示器 / Custom indicator support
- 📏 支持前置/后置组件 / Leading/trailing widgets
- 🔄 支持RTL布局 / RTL layout support
基础示例 / Basic Example
LinearProgressBar(
percent: 0.7,
lineHeight: 10,
progressColor: Colors.blue,
backgroundColor: Colors.grey,
)
动画示例 / Animation Example
LinearProgressBar(
percent: 0.8,
animation: true,
animationDuration: 1000,
curve: Curves.easeInOut,
progressColor: Colors.green,
)
渐变示例 / Gradient Example
LinearProgressBar(
percent: 0.6,
linearGradient: LinearGradient(
colors: [Colors.blue, Colors.purple],
),
)
自定义指示器 / Custom Indicator
LinearProgressBar(
percent: 0.5,
widgetIndicator: Icon(Icons.arrow_drop_down),
leading: Text('0%'),
trailing: Text('100%'),
)
注意事项 / Notes
- percent 必须在 0.0 到 1.0 之间 / Must be between 0.0 and 1.0
- 不能同时设置 linearGradient 和 progressColor / Cannot set both
- 不能同时设置 linearGradientBackgroundColor 和 backgroundColor / Cannot set both
See also:
- CycleProgressBar - 圆形进度条组件
- CircularProgressIndicator - Flutter 原生圆形进度指示器
- on