Skip to content

Instantly share code, notes, and snippets.

@felixblaschke
Last active May 19, 2019 06:54
Show Gist options
  • Select an option

  • Save felixblaschke/f2d43aada38786d35b4e1457aed8f6aa to your computer and use it in GitHub Desktop.

Select an option

Save felixblaschke/f2d43aada38786d35b4e1457aed8f6aa to your computer and use it in GitHub Desktop.
acx3.dart
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