|
@@ -106,8 +106,8 @@ class AnimatedGradientProgressBarState
|
|
|
children: [
|
|
children: [
|
|
|
// 百分比文本
|
|
// 百分比文本
|
|
|
Positioned(
|
|
Positioned(
|
|
|
- // 左侧偏移量,跟随当前进度的末尾,公式:当前比例值 * 进度条的宽度 - 气泡宽度
|
|
|
|
|
- left: widget.targetValue * progressBarWidth - (widget.targetValue > 0.5 ? 32 : 24),
|
|
|
|
|
|
|
+ // 左侧偏移量,气泡跟随在当前进度的末尾,公式:当前比例值 * 进度条的宽度 - 气泡宽度
|
|
|
|
|
+ left: _animation.value * progressBarWidth - (widget.targetValue > 0.5 ? 32 : 24),
|
|
|
// 进度气泡,位于进度条上方
|
|
// 进度气泡,位于进度条上方
|
|
|
bottom: widget.height + 0.85,
|
|
bottom: widget.height + 0.85,
|
|
|
child: AnimatedBuilder(
|
|
child: AnimatedBuilder(
|