Browse Source

Switch to simple progress widget with no animation

Neeraj Gupta 2 years ago
parent
commit
835e8d01bd
1 changed files with 4 additions and 8 deletions
  1. 4 8
      lib/ui/code_timer_progress.dart

+ 4 - 8
lib/ui/code_timer_progress.dart

@@ -1,6 +1,6 @@
+import 'package:ente_auth/ui/linear_progress_widget.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/scheduler.dart';
-import 'package:flutter_animation_progress_bar/flutter_animation_progress_bar.dart';
 
 class CodeTimerProgress extends StatefulWidget {
   final int period;
@@ -47,13 +47,9 @@ class _CodeTimerProgressState extends State<CodeTimerProgress>
 
   @override
   Widget build(BuildContext context) {
-    return FAProgressBar(
-      currentValue: _progress * 100,
-      size: 4,
-      animatedDuration: const Duration(milliseconds: 10),
-      progressColor: Colors.orange,
-      changeColorValue: 40,
-      changeProgressColor: Colors.green,
+    return LinearProgressWidget(
+      color: _progress > 0.4 ? Colors.green : Colors.orange,
+      fractionOfStorage: _progress,
     );
   }
 }