Comments (2)
I found this solution.
bool hasConnection;
try {
await Firestore.instance.runTransaction((Transaction tx) {}).timeout(
Duration(seconds: 5));
hasConnection = true;
} on PlatformException catch() { // May be thrown on Airplane mode
hasConnection = false;
} on TimeoutException catch() {
hasConnection = false;
}
from data_connection_checker.
I am lurking for this problem/solution all over internet and I hoped this package handles this. If you are correct, it is issue.
from data_connection_checker.
Related Issues (19)
- web support HOT 1
- It's still returning true even if my wifi has not active internet connection.. HOT 1
- Add network check
- SocketException connecting to https//1.1.1.1
- No internet connection even though I have internet connection. HOT 29
- Don't use it on production for iOS! HOT 8
- Disconnected status when the application is in the background HOT 5
- Adding custom addresses to check for connection HOT 2
- SocketException when device is offline
- Insecure connections are disabled by default on iOS and Android
- Apple rejected my update due to data connection checker HOT 2
- Don't have internet connection appears while I have internet connection on sim 4g. HOT 3
- Migrate to Sound Null Safety HOT 9
- Null-safety HOT 8
- Modify testing logic to immediately return if any of the simultaneous pings succeed HOT 1
- Is this plugin still on BETA? HOT 1
- add stream of status for different addresses
- can't add the package (Version Failure) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data_connection_checker.