SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class TranslateTransition extends AnimatedWidget {
  2.   const TranslateTransition({
  3.     Key key,
  4.     @required Animation<double> translate,
  5.     this.alignment = Alignment.center,
  6.     this.child,
  7.   }) : super(key: key, listenable: translate);
  8.  
  9.   Animation<double> get translate => listenable;
  10.  
  11.   final Alignment alignment;
  12.  
  13.   final Widget child;
  14.  
  15.   @override
  16.   Widget build(BuildContext context) {
  17.     final double translateValue = translate.value;
  18.     final Matrix4 transform = Matrix4.identity()
  19. //      ..translate(translateValue, translateValue, 1.0);
  20.       ..translate(translateValue);
  21.     return Transform(
  22.       transform: transform,
  23.       alignment: alignment,
  24.       child: child,
  25.     );
  26.   }
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