-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question - Is there a way to enable the "swipe to go back" gesture? #3
Comments
Thanks ! Concerning your question, "swipe from the edge" in a functionality linked to the Route. Currently I'm using a custom route that you can not customize so it's not possible. Moreover, since I based it on MaterialPageRoute, its matching material guidelines (i.e. no swipe to back). I will find a way:
I am currently working on adding declarative to the package but I will tackle this issue right after, I will post an update here once it's done. |
This should be fixed now. It's enabled by default, if their is a need for more customization I might had an option but for now this should be enough for you. |
Thx! Is that included in v0.0.13+1? |
Yes it is ! |
Thanks! Tried, but couldn't get it to work. Maybe I'm doing something wrong?
Tested Vrouter v0.0.13+1 with Flutter v1.26.0 on iOS 14 (tried on an actual iPhone 10 device, as well as on the iOS Simulator of iPhone 12) |
In order to stack widget one on top on each other, you have to use subroutes. Here is an example in which the UnknownScreen is stacked on top of the HomeScreen: VRouter(
mode: VRouterModes.history,
routes: [
VStacked(path: kSplashPath, widget: SplashScreen()),
VStacked(path: kLoginPath, widget: LoginScreen()),
VStacked(path: kRootPath, widget: HomeScreen(), subroutes: [
VStacked(path: kUnknownPath, widget: UnknownScreen()),
]),
VRouteRedirector(path: r':_(.*)', redirectTo: kUnknownPath),
],
) I admit that the doc are missleading, I will update them. I also recently updated the example to reflect this use of VStacked. I hope you will get what you want ! |
THANKS! |
Hi there,
First - Amazing package!
Quick question:
I've noticed the "swipe from the edge" doesn't work out of the box.
Is there a way to enable it in Vrouter? or specifically to a "Vstack"?
The text was updated successfully, but these errors were encountered: