-
Notifications
You must be signed in to change notification settings - Fork 21
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
How do I reload the splash screen? #25
Comments
Hum that a use case I never had or encounter ^^ there is no built in way to "restart" a splash screen (as normally they just play once and that's it). |
That's what I thought! So I do understand a bit about StatefulWidgets. Well.. it didn't work. And I made sure a unique key was used the second time. Hmm maybe the key isn't passed properly. We don't use StatefulWidgets often, but perhaps I could try a fork that refreshes a refresh by using As to it being a weird use case, I agree. We're rolling out a version of the app without persistent storage so without network the app is stuck on the loading screen. |
By looking at the code you're right the Key is not passed for named constructors... My bad... you can try using the default constructor |
Sweet, that did it! I'm pretty neglectful with |
Glad it worked ! I'm keeping this one open to remind me to fix those keys ^^ |
I've got the splash screen wrapped in a StatelessWidget. The idea is that if something really bad fails, a dialog pops up and the user can confirm another attempt. At which point the loading screen starts anew, running the
until
function which hopefully succeeds this time.We do our state keeping with streams. I tried to get the SplashScreen to re-load using a StreamBuilder but somehow.. it won't. I can get the re-build to run, but I can't get the splash screen to run again or any of its callback functions.
Here is the relevant snippet:
I'm probably missing something fundamental about state keeping with Flutter widgets. What's the best way to re-load the splash screen without re-routing or anything hacky?
The text was updated successfully, but these errors were encountered: