Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ShaiqAhmedkhan/cb4e10462a536eeaf01cc2def10b4578 to your computer and use it in GitHub Desktop.
Save ShaiqAhmedkhan/cb4e10462a536eeaf01cc2def10b4578 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class StaggeredTrekkingEnterAnimation {
StaggeredTrekkingEnterAnimation(this.controller)
: barHeight = Tween<double>(begin: 0, end: 150).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0, 0.3, curve: Curves.easeIn),
),
),
avatarSize = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.3, 0.6, curve: Curves.elasticOut),
),
),
titleOpacity = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.6, 0.65, curve: Curves.easeIn),
),
),
textOpacity = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.65, 0.8, curve: Curves.easeIn),
),
),
imageOpacity = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(
parent: controller,
curve: Interval(0.8, 0.99, curve: Curves.easeIn),
),
);
final AnimationController controller;
final Animation<double> barHeight;
final Animation<double> avatarSize;
final Animation<double> titleOpacity;
final Animation<double> textOpacity;
final Animation<double> imageOpacity;
//final Animation<double> contactOpacity;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment