-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathFadeAnimation.dart
35 lines (32 loc) · 1.05 KB
/
FadeAnimation.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// import 'package:flutter/material.dart';
// import 'package:simple_animations/simple_animations.dart';
// class FadeAnimation extends StatelessWidget {
// final double delay;
// final Widget child;
// FadeAnimation(this.delay, this.child);
// @override
// Widget build(BuildContext context) {
// final tween = MultiTrackTween([
// Track('opacity').add(Duration(milliseconds: 500),
// Tween(begin: 0.0, end: 1.0)
// ),
// Track('translateX').add(Duration(milliseconds: 500),
// Tween(begin: 120.0, end: 0.0),
// curve: Curves.easeOut
// )
// ]);
// return ControlledAnimation(
// delay: Duration(milliseconds: (500 * delay).round()),
// duration: tween.duration,
// tween: tween,
// child: child,
// builderWithChild: (context, child, animation) => Opacity(
// opacity: animation['opacity'],
// child: Transform.translate(
// offset: Offset(animation['translateX'], 0),
// child: child,
// ),
// ),
// );
// }
// }