Skip to content

Instantly share code, notes, and snippets.

@felixblaschke
Created January 22, 2021 15:54
Show Gist options
  • Save felixblaschke/9e142a349d8a2109bcc556423095d6d9 to your computer and use it in GitHub Desktop.
Save felixblaschke/9e142a349d8a2109bcc556423095d6d9 to your computer and use it in GitHub Desktop.
var _tween = TimelineTween<AniProps>()
..addScene(begin: 0.seconds, duration: 1.seconds)
.animate(AniProps.x, tween: (-100.0).tweenTo(100.0)) // x to right
..addScene(begin: 1.seconds, duration: 1.seconds)
.animate(AniProps.y, tween: (-100.0).tweenTo(100.0)) // y down
..addScene(begin: 2.seconds, duration: 1.seconds)
.animate(AniProps.x, tween: (100.0).tweenTo(-100.0)) // x to left
..addScene(begin: 3.seconds, duration: 1.seconds)
.animate(AniProps.y, tween: (100.0).tweenTo(-100.0)); // y up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment