<p>Here is an example of AnimatedContainer Widget.</p> <p>_MyAppState(); }</p> <p>class _MyAppState extends State { var counter = 0; double _padding = 20.0; @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ AnimatedContainer( color: Colors.red, duration: Duration(milliseconds: 500), child: Text( 'Clicked $counter times', ), ), RaisedButton( onPressed: () { setState(() { counter++; _padding = _padding + 10; }); }, child: Text('Click here'), ) ], ), ), ), ); } } ` Thanks,Srikanth</p>
AnimatedContainer Example
This Article is posted by seven.srikanth at 8/23/2020 8:34:05 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