Last active
October 6, 2021 14:15
-
-
Save rutvik110/debcaaab19ceeb51059a4388b5531fd6 to your computer and use it in GitHub Desktop.
MyCustom Implicit Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCustomImplicitAnimation extends StatelessWidget { | |
const MyCustomImplicitAnimation({Key? key}) : super(key: key); | |
static final dimensionsTween = Tween<double>(begin: 100.0, end: 200.0); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: TweenAnimationBuilder<double>( | |
tween: dimensionsTween, | |
duration: const Duration(seconds: 1), | |
builder: (context, value, child) { | |
return Center( | |
child: Container( | |
color: Colors.blue, | |
height: value, | |
width: value, | |
), | |
); | |
}, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment