14 lines
472 B
Dart
14 lines
472 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../config.dart';
|
|
|
|
Widget slideTransition(BuildContext context, Animation<double> animation,
|
|
Animation<double> secondaryAnimation, Widget child) {
|
|
final tween = Tween<Offset>(begin: const Offset(1, 0), end: Offset.zero);
|
|
final curvedAnimation = CurvedAnimation(parent: animation, curve: AppAnimationConfig.slideCurve);
|
|
return SlideTransition(
|
|
position: tween.animate(curvedAnimation),
|
|
child: child,
|
|
);
|
|
}
|