Skip to content

Commit

Permalink
codegov/patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Jha committed Dec 22, 2024
1 parent 8c21409 commit b15cfc4
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ class MockConnectivityService extends Mock
return Future.value(connectivityStatus!);
}

@override
Future<bool> hasConnection() async {
try {
final results = await getConnectionType();
return results.isNotEmpty &&
results.any((result) => result != ConnectivityResult.none);
} catch (e) {
return false;
}
}

@override
Future<bool> isReachable({
http.Client? client,
Expand Down

0 comments on commit b15cfc4

Please sign in to comment.