SHARE
TWEET

Untitled

a guest Sep 11th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ),
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top