Last active
May 19, 2019 06:54
-
-
Save felixblaschke/f2d43aada38786d35b4e1457aed8f6aa to your computer and use it in GitHub Desktop.
acx3.dart
This file contains hidden or 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 _WidgetWithAnimationState extends State<WidgetWithAnimation> | |
| with AnimationControllerMixin { | |
| Animation<double> width; | |
| @override | |
| void initState() { | |
| width = Tween(begin: 100.0, end: 200.0).animate(controller); | |
| controller.addTask(FromToTask(duration: Duration(seconds: 1), to: 1.0)); | |
| super.initState(); | |
| } | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| width: width.value, | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment