base_project
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// page slide transition effect
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SlideRightRoute extends PageRouteBuilder {
|
||||
final Widget page;
|
||||
SlideRightRoute({required this.page})
|
||||
: super(
|
||||
pageBuilder: (
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
) =>
|
||||
page,
|
||||
transitionsBuilder: (
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
Widget child,
|
||||
) =>
|
||||
SlideTransition(
|
||||
textDirection: TextDirection.rtl,
|
||||
position: Tween<Offset>(
|
||||
begin: const Offset(-1, 0),
|
||||
end: Offset.zero,
|
||||
).animate(animation),
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user