Provided Animation for Progress Bar (#2067)

This commit is contained in:
Lightning-Lion
2024-11-23 07:56:52 +08:00
committed by GitHub
parent 9ccf744597
commit df672340c6
+10 -3
View File
@@ -432,9 +432,16 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
style: const TextStyle(fontSize: 20),
),
const SizedBox(height: 5),
CustomProgressBar(
progress: _totalBytes == 0 ? 0 : currBytes / _totalBytes,
borderRadius: 5,
TweenAnimationBuilder<double>(
tween: Tween<double>(begin:0, end:_totalBytes == 0 ? 0 : currBytes / _totalBytes),
duration: Duration(seconds: 1),
curve: Curves.easeOut,
builder: (context, value, child) {
return CustomProgressBar(
progress: value,
borderRadius: 5,
);
},
),
AnimatedCrossFade(
crossFadeState: _advanced ? CrossFadeState.showSecond : CrossFadeState.showFirst,