Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AnimationController controller;
- String get timerString {
- Duration duration = controller.duration * controller.value;
- return '${(duration.inMinutes % 60).toString().padLeft(2, '0')}:${(duration.inSeconds % 60).toString().padLeft(2, '0')}';
- }
- @override
- void initState() {
- super.initState();
- controller = AnimationController(
- vsync: this,
- duration: Duration(seconds: 3),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement