Steelhacks-2023 / Lost-At-Pitt

Lost @ Pitt is a multi-platform lost-and-found tracking application, allowing users to return & reclaim lost items. Currently in development!
https://steelhacks-2023.github.io/Lost-At-Pitt/
6 stars 0 forks source link

Combine MapPage StreamBuilders #20

Closed tbeidlershenk closed 10 months ago

tbeidlershenk commented 10 months ago

Something I noticed that we should fix in the future. Right now we need to have two StreamBuilders so that we can separate the lost items from the found items by querying them separately - but in the future I think we should move to have all the items in the same table of the database but just with an extra attribute that is either "lost" or "found", then we can query all the data with one StreamBuilder then put it in separate lists based on that attribute.

Alternatively, and will probably be way easier, we can use a MultiStreamBuilder to listen to two streams at once. https://stackoverflow.com/questions/51880330/flutter-stream-two-streams-into-a-single-screen