You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png"alt="Buy Me A Coffee"height="102"width="363" />
50
53
</a>
51
54
52
-
_Every coffee helps fuel late-night coding sessions and the occasional existential crisis about whether `null` is a friend or foe._ 🤔☕
55
+
_Every coffee helps fuel late-night coding sessions and the occasional
56
+
existential crisis about whether `null` is a friend or foe._ 🤔☕
53
57
54
58
## 🌍 Platform Support
55
59
@@ -58,7 +62,8 @@ _Every coffee helps fuel late-night coding sessions and the occasional existenti
58
62
| Check Connectivity | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
59
63
| Listen to Changes | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
60
64
61
-
_Full support across all platforms - because connectivity anxiety is universal!_ 🚀
65
+
_Full support across all platforms - because connectivity anxiety is universal!_
66
+
🚀
62
67
63
68
## 📋 Permissions
64
69
@@ -113,7 +118,8 @@ final subscription = InternetConnection().onStatusChange.listen(
113
118
);
114
119
```
115
120
116
-
_Don't forget to cancel the subscription to prevent memory leaks! Your phone's RAM will thank you._ 🧹
121
+
_Don't forget to cancel the subscription to prevent memory leaks! Your phone's
122
+
RAM will thank you._ 🧹
117
123
118
124
## 🎯 Advanced Features
119
125
@@ -130,7 +136,8 @@ final connection = InternetConnection.createInstance(
130
136
final isConnected = await connection.hasInternetAccess;
131
137
```
132
138
133
-
_Pro tip: Make sure your endpoints have no caching and aren't CORS blocked on web. We learned this the hard way._ 🌐
139
+
_Pro tip: Make sure your endpoints have no caching and aren't CORS blocked on
140
+
web. We learned this the hard way._ 🌐
134
141
135
142
### Using custom success criteria
136
143
@@ -154,11 +161,13 @@ final connection = InternetConnection.createInstance(
154
161
final isConnected = await connection.hasInternetAccess;
155
162
```
156
163
157
-
_Nice status codes! Because sometimes 200 OK is too mainstream for your vibe._ 😎
164
+
_Nice status codes! Because sometimes 200 OK is too mainstream for your vibe._
165
+
😎
158
166
159
167
### Using a custom connectivity check method
160
168
161
-
For advanced use cases, you can completely customize how connectivity checks are performed by providing your own connectivity checker:
169
+
For advanced use cases, you can completely customize how connectivity checks are
170
+
performed by providing your own connectivity checker:
162
171
163
172
```dart
164
173
final connection = InternetConnection.createInstance(
@@ -186,7 +195,8 @@ final connection = InternetConnection.createInstance(
186
195
);
187
196
```
188
197
189
-
This customization gives you full control over the connectivity detection process, allowing you to:
198
+
This customization gives you full control over the connectivity detection
199
+
process, allowing you to:
190
200
191
201
- 🔧 Implement platform-specific network detection
192
202
- 🔄 Use alternate connectivity checking strategies
@@ -257,17 +267,22 @@ final connection = InternetConnection.createInstance(
257
267
258
268
> [!CAUTION]
259
269
>
260
-
> **Use `enableStrictCheck` only with custom-defined URIs, not with the default ones.**
270
+
> **Use `enableStrictCheck` only with custom-defined URIs, not with the default
271
+
> ones.**
261
272
>
262
-
> Using it with the default URIs may lead to unreliable results or service outages, as all default endpoints must be up and reachable for a positive result.
273
+
> Using it with the default URIs may lead to unreliable results or service
274
+
> outages, as all default endpoints must be up and reachable for a positive
275
+
> result.
263
276
264
-
_Strict mode: For the perfectionists who need ALL the endpoints to respond. We won't judge your trust issues._ 💯
277
+
_Strict mode: For the perfectionists who need ALL the endpoints to respond. We
278
+
won't judge your trust issues._ 💯
265
279
266
280
## 📡 Built-in and Additional URIs
267
281
268
282
### Default URIs
269
283
270
-
The following endpoints are checked by default _(carefully selected for speed and reliability!)_:
284
+
The following endpoints are checked by default _(carefully selected for speed
0 commit comments