Closed tbeidlershenk closed 7 months ago
This has somewhat been implemented by using HomePage
as the streaming page which then can switch to the map view, list view, etc with a DataService
singleton class storing the lost and found collections. It will be closed with #45
Database calls are made in the following files:
And soon we will need to make calls for the messaging functionality of the app when we build that. I think it would be beneficial to move all our database access to a separate file.
Another somewhat related issue: the map page is wrapped in a
StreamBuilder2
widget listening to the Lost and Found streams. Then when the user switches to the list page, the current data is passed into that page from the map page. This seems like a bad way to do it since one page is in charge of doing the updates. Why don't we wrap the current page in main.dart MaterialApp widget in the StreamBuilder widget instead? Then we can pass the data to whatever page wants it.To illustrate my point -
Instead I suggest we do this -
Where
StreamBuilderWrapper
is defined in the database operations file and we simply pass the current data into the correct page based on the parameter, 'loginPage' or 'mapPage' (and in the future chat pages)