Skip to content

Commit 75c86e2

Browse files
committed
Fix url used for checking offline status
spec.endpoint is actually set to https://HOSTNAME/v1 which can't be used to check the online status. However, sdk.url is https://appwrite.io which can be used to check for internet connectivity.
1 parent fc4918a commit 75c86e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/flutter/lib/src/client_offline_mixin.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class ClientOfflineMixin {
183183

184184
Future<void> checkOnlineStatus() async {
185185
try {
186-
final url = Uri.parse('{{spec.endpoint}}/version');
186+
final url = Uri.parse('{{sdk.url}}/version');
187187
await http.head(url).timeout(Duration(seconds: 1));
188188
isOnline.value = true;
189189
} catch (_) {

0 commit comments

Comments
 (0)