isInternetConnectedProvider top-level property
Simple provider to get the current connection as a boolean
Implementation
final isInternetConnectedProvider = Provider<bool?>((ref) {
final asyncStatus = ref.watch(internetStatusStreamProvider);
return asyncStatus.when(
data: (status) => status == ConnectionStatus.connected,
loading: () => null,
error: (_, __) => false,
);
});