Skip to content

Instantly share code, notes, and snippets.

@felixblaschke
Created April 14, 2019 06:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixblaschke/d1a6735d97fb61b988528337997a9dea to your computer and use it in GitHub Desktop.
Save felixblaschke/d1a6735d97fb61b988528337997a9dea to your computer and use it in GitHub Desktop.
Fancy Background Animation
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