Skip to content

Flutter Web Url Navigation #67

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

Open
VarmaTech opened this issue May 13, 2020 · 4 comments
Open

Flutter Web Url Navigation #67

VarmaTech opened this issue May 13, 2020 · 4 comments

Comments

@VarmaTech
Copy link

HI ,
i am facing issues as below
As per your tutorial i kept url navigation which is working awesome, but i am not able to return to same page where i clicked refresh or reload in a particular page
for example :
i have navigated to Page 1 > Page 2 > Page 3 ( here i refresh or reloaded). now app is going
back to initialRoute page i.e. Page 1.

Can i store the Navigated Page so that i can return to same page if refresh or reload .

when i click on Back in chrome , below error is showing up :

Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/history.dart:110:14
            _userProvidedRouteName != null
            is not true
                at Object.throw_ [as throw] (http://localhost:60559/dart_sdk.js:4773:11)
                at Object.assertFailed (http://localhost:60559/dart_sdk.js:4724:15)
                at _engine.BrowserHistory.new.[_popStateListener] (http://localhost:60559/dart_sdk.js:143461:59)
@FilledStacks
Copy link
Owner

Hey, the named routing should be updating the url in the browser. A refresh should keep the same url and then navigate back to that page. Check if you can navigate to page 3 directly using a url only. Then refresh on it.

@VarmaTech
Copy link
Author

VarmaTech commented May 16, 2020

HI @FilledStacks .
I did that ,

i am developing a website in which :
Page 1 : Login page
Page 2 : Home page
Page 3 : Details Page

so when i refresh Page 3 using chrome refresh button , i was redirected to Page 1 ,

  • also when i click on Chrome Back Button , its is not working , as expected is (Page 3 to Page 2)

  • also i use Navigator.pushNamed(context, "page3"); function it is directly sending me to Page3

but login authenication is getting skipped.

Note : RouteSettings is losing the name . i am getting empty name on chrome refresh button

@FilledStacks
Copy link
Owner

Mmmm, then I don't know. I know I fixed it in the Flutter web series, but it might have changed. If you're looking at using Flutter Web there's a lot of things that won't work as it should that you'll have to struggle with and figure out. I'll be sorting all these things out for my Flutter Web app some point in the next two months then I'll most likely make some update videos for it.

@VarmaTech
Copy link
Author

@FilledStacks thanks man, i tried some ways but it is not working .

i appreciate your hard work . i am counting on you .

ll be waiting for your update .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants