I want to change my flutter app theme at runtime but I am running into some problems.
The problems are that I am using go router for navigation and the option to change theme is on on 4th shell route the settings page I have wrapped the material app with stream builder and is providing new theme but it resets the app and opens the default route the home page when the data changes and also restarts the async operations that previously happened on the home page and i don't want i want the user to stay on the settings page and see the changes on the settings page itself resetting to the default route.
One solution i thought was to use a custom inherited widget with theme data and not use the default Theme.of provided by the material app but i don't like this approach.