Created
May 28, 2024 19:14
-
-
Save railson-ferreira/4af53636f5f4431515c829002788d7a1 to your computer and use it in GitHub Desktop.
Flutter Progress bounceOut Animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| home: Scaffold( | |
| body: TweenAnimationBuilder( | |
| curve: Curves.bounceOut, | |
| tween: Tween(begin: 0.0, end: 1.0), | |
| duration: Duration(seconds: 1), | |
| builder: (context, value, _) { | |
| return Column( | |
| mainAxisSize: MainAxisSize.min, | |
| crossAxisAlignment: CrossAxisAlignment.start, | |
| children: [ | |
| Text("${(value * 100).round()}"), | |
| Container( | |
| color: Colors.red, | |
| height: 10, | |
| width: value * 100, | |
| ), | |
| ], | |
| ); | |
| }, | |
| ), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment