I am working on a flutter project that requires me to show a maps widget on separate screens. Currently, on every single screen, a separate maps widget is loaded and this is costly as google pricing is based on map loads.
Asked
Active
Viewed 363 times
0
-
Sure it is, but what have you tried so far? – krumpli Apr 20 '22 at 16:15
-
Still new to flutter and the best I have done rudimentary statement. Thought of passing the entire widget to the next screen but not sure how that would work. You could point me to the resource I can use to piece it together if you will. – Josh Cipher Apr 20 '22 at 16:54
-
So it took me a while but I came up with a solution that somewhat works. So I restructured the app to have a single screen. This screen acts as the widget rendered in the background and the rest of the UI elements are rendered on the bottom sheet dialog or similar widgets. In the dialog, I used an indexed stack to hold the different UI elements to navigate between them I change the index valueof the indexed stack. – Josh Cipher Jun 06 '22 at 13:46