Skip to content

Instantly share code, notes, and snippets.

@railson-ferreira
Created May 28, 2024 19:14
Show Gist options
  • Select an option

  • Save railson-ferreira/4af53636f5f4431515c829002788d7a1 to your computer and use it in GitHub Desktop.

Select an option

Save railson-ferreira/4af53636f5f4431515c829002788d7a1 to your computer and use it in GitHub Desktop.
Flutter Progress bounceOut Animation
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