Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Desired duration for the animation
- int _animationDuration = 1000;
- // Change these properties to trigger the animation.
- Color _widgetColor = Colors.blue;
- double _elevation = 10;
- Color _shadowColor = Colors.blue;
- // Add the container to your widget tree (eg. Column, Container)
- AnimatedPhysicalModel(
- duration: Duration(milliseconds: _animationDuration),
- child: Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(10))),
- height: 300,
- width: 300,
- child: FlutterLogo(),
- ),
- shape: BoxShape.rectangle,
- color: _widgetColor,
- elevation: _elevation,
- shadowColor: _shadowColor,
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement