<p>Here is an example of TweenAnimationBuilder. _MyAppState(); }</p> <p>class _MyAppState extends State { var counter = 0; double _padding = 20.0; @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: TweenAnimationBuilder( builder: (BuildContext context, value, Widget child) { return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( color: Colors.red, padding: EdgeInsets.all(value), child: Text( 'Clicked $counter times', ), ), RaisedButton( onPressed: () { setState(() { counter++; _padding = _padding + 10; }); }, child: Text('Click here'), ) ], ), ); }, duration: Duration(seconds: 1), tween: Tween(begin: 20.0, end: _padding), ), ), ); } } `</p>
TweenAnimationBuilder Example
This Article is posted by seven.srikanth at 8/23/2020 8:35:21 AM
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter
Tags:
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter