I want to make the user to access firestore data in my flutter app only when they are online.
I am expecting that firestore data can’t stored in cache memory, so tha tthe user only gets the data when they are online.
I want to make the user to access firestore data in my flutter app only when they are online.
I am expecting that firestore data can’t stored in cache memory, so tha tthe user only gets the data when they are online.
3
Answers
you can check the internet by using
connectivity_plus: ^3.0.2
packageand with this package u can apply ur logic regarding connectivity…
you can check the internet by using connectivity_plus: ^3.0.2 package
so you can disable delete button if there is no internet
Your code will be like this:
}
Then up your widget write this condition
now if there is no internet connection the widget will not appear
It sounds like your question is just asking how to disable any persistence to confirm that your app is only receiving up-to-date data. You can configure that with your Firebase settings. Below is a snippet of code from the documentation.
More information can be found on the Access data offline documentation