CircularAnimatedProgressBar constructor
CircularAnimatedProgressBar({
- Key? key,
- double size = 150.0,
- double progress = .2,
- bool isShowProgress = true,
- Curve curve = Curves.linear,
- void onPressed()?,
- double waveHeight = 12,
- bool completedIsShowWave = true,
- String completedText = 'Completed',
- Color backgroundColor = const Color(0x0D2192F3),
- List<
Color> colorsWave = const [Color(0x4D2196f3), Color(0x662196f3), Color(0xCC2196f3)], - TextStyle showProgressTextStyle = const TextStyle(fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white, shadows: [Shadow(offset: Offset(1, 1), blurRadius: .2, color: Colors.black26)]),
构造方法
Implementation
CircularAnimatedProgressBar(
{super.key,
this.size = 150.0,
this.progress = .2,
this.isShowProgress = true,
this.curve = Curves.linear,
this.onPressed,
this.waveHeight = 12,
this.completedIsShowWave = true,
this.completedText = 'Completed',
this.backgroundColor = const Color(0x0D2192F3),
/// 默认为蓝色
/// 2、4、6 排序显示为 最上层为 6 、4 、2
this.colorsWave = const [
Color(0x4D2196f3),
Color(0x662196f3),
Color(0xCC2196f3),
],
this.showProgressTextStyle = const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white,
shadows: [
Shadow(offset: Offset(1, 1), blurRadius: .2, color: Colors.black26)
])})
: assert(progress >= 0.0 && progress <= 1.0,
"Progress must be less than 1 and greater than 0"),
assert(size > 0.0, "The size must be greater than 0"),
assert(colorsWave.isNotEmpty && colorsWave.length <= 3,
"ColorsWave must be not empty and length less than 3");