Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. // Desired duration for the animation
  2. int _animationDuration = 1000;
  3.  
  4. // Change these properties to trigger the animation.
  5. Color _widgetColor = Colors.blue;
  6. double _elevation = 10;
  7. Color _shadowColor = Colors.blue;
  8.  
  9. // Add the container to your widget tree (eg. Column, Container)
  10. AnimatedPhysicalModel(
  11. duration: Duration(milliseconds: _animationDuration),
  12. child: Container(
  13. decoration: BoxDecoration(
  14. borderRadius: BorderRadius.all(Radius.circular(10))),
  15. height: 300,
  16. width: 300,
  17. child: FlutterLogo(),
  18. ),
  19. shape: BoxShape.rectangle,
  20. color: _widgetColor,
  21. elevation: _elevation,
  22. shadowColor: _shadowColor,
  23. ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement