第一次提交
This commit is contained in:
13
lib/animations/slide.dart
Normal file
13
lib/animations/slide.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
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,
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user