Skip to content

How to deal with offline/online connection states #77

Description

@andreacioni

Hi Frank! I've set up everything with the latest version of flutter_data and flutter_data_state and all the stuffs work pretty well (some refinement to be done yet). Now I'm looking for a way to handle offline/online states, I read all the docs and the tutorials you made but it's not completely clear, for me, how to deal with them.

Let me explain better. From the first time I used this library I wondered that the online/offline support would work "automatically" and in case of a unavailable/unstable connection the underlying mechanism would make all work in the same manner (the user will receive the cached view of the resources). Now I'm seeing that this is not the behaviour. If I turn off the WiFi and reload (with a RefreshIndicator component) an exception raise causing the notifier.hasException to be true.

I'm probably using your libary in a wrong way. It's up to the user to decide what data source to use with a flag, maybe the remote in watchAll/wathOne ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions