I've setup a provider stream so that everytime there is a change on the user data in fire store, there is a widget call wrapper which routes the user to the correct screen.

Nonetheless I want my user to keep using the app even without Ethernet connection, so I decided to have some shared preferences to keep track of the log ins and the user id.

I was wondering if there is a similar listener like the one used in stream builder so that everytime I change the shared preferences I can switch screens from my “wrapper” file (the wrapper is the file where I route an user to a correct screen depending on the state of the app).

If there is a better practice to keep offline functionality that’d be great to know!


Solution 1: Loren.A

Sounds like this Streaming Shared Preferences Package will help you out here.