This commit is contained in:
2020-09-10 02:13:22 +06:30
parent cdefe7c06d
commit 7a2053e858
24 changed files with 336 additions and 320 deletions

View File

@@ -0,0 +1,23 @@
import 'package:flutter/cupertino.dart';
class RightLeftPageRoute extends PageRouteBuilder {
final Widget child;
RightLeftPageRoute(this.child)
: super(
pageBuilder: (context, animation, secondaryAnimation) => child,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
var begin = Offset(1.0, 0.0);
var end = Offset.zero;
var curve = Curves.ease;
var tween =
Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
return SlideTransition(
position: animation.drive(tween),
child: child,
);
},
);
}