Skip to content

Conversation

@bizz84
Copy link
Owner

@bizz84 bizz84 commented Nov 26, 2024

The old AppStartupWidget setup wasn't playing nice with deep links and URL navigation when used with MaterialApp.router / GoRouter.

This PR fixes this with two changes:

  • Remove the old /startup route (the app startup logic is about application state, but shouldn't have anything to do with routing)
  • Use MaterialApp.builder to return the AppStartupWidget. This way, AppStartupWidget can control any asynchronous app initialization without interfering with the routing logic, and returns the intended child widget only when the initialization is done.

To better support passing the child when loading is complete, a new AppStartupDataWidget class has been added.

@bizz84 bizz84 merged commit 3615f9d into master Nov 26, 2024
1 check passed
@bizz84 bizz84 deleted the update-app-startup-logic branch November 26, 2024 17:30
@bizz84 bizz84 mentioned this pull request Dec 2, 2024
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

Successfully merging this pull request may close these issues.

2 participants