Created
April 14, 2019 06:28
-
-
Save felixblaschke/d1a6735d97fb61b988528337997a9dea to your computer and use it in GitHub Desktop.
Fancy Background Animation
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 FancyBackgroundApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Stack( | |
children: <Widget>[ | |
Positioned.fill(child: AnimatedBackground()), | |
onBottom(AnimatedWave( | |
height: 180, | |
speed: 1.0, | |
)), | |
onBottom(AnimatedWave( | |
height: 120, | |
speed: 0.9, | |
offset: pi, | |
)), | |
onBottom(AnimatedWave( | |
height: 220, | |
speed: 1.2, | |
offset: pi / 2, | |
)), | |
Positioned.fill(child: CenteredText()), | |
], | |
); | |
} | |
onBottom(Widget child) => Positioned.fill( | |
child: Align( | |
alignment: Alignment.bottomCenter, | |
child: child, | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment