y_router

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

y router

一个用于帮助 flutter APP widget间跳转的工具
copied to clipboard
y_router #
🧑‍💻 Route animation by using flutter's transition widget


Getting Started #
Add dependency #
dependencies:
y_router: ^1.0.1

copied to clipboard
Examples #
Your can use YRouter to push route
YRouter.push(
context: context,
type: AnimationEnum.cubicY,
target: SecondPageWidget(),
);
copied to clipboard
or use Navigator to push route
fianl route = YRouter.buildRoute(target: SecondPageWidget(), animationTypes: [
AnimationEnum.size,
AnimationEnum.fade,
AnimationEnum.cubicY],
currentPage: settings.arguments as Widget,
transitionMs: 2000);

Navigator.push(context, route);

copied to clipboard
or
onGenerateRoute: (settings) {
return YRouter.buildRoute(target: SecondPageWidget(), animationTypes: [
AnimationEnum.size,
AnimationEnum.fade,
AnimationEnum.cubicY],
currentPage: settings.arguments as Widget,
transitionMs: 2000);
},
copied to clipboard
You can choose the following types And supports multiple
enum AnimationEnum {
fade,
size,
rotate,
scale,
cubicX,
cubicY,
slideFromLeft,
slideFromRight,
slideFromTop,
slideFromBottom
}

copied to clipboard
You have learned 👍

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.