feat: enhance connectivity management and status handling
- Integrated connectivity status monitoring into the RouterNotifier to manage navigation based on network availability. - Refactored ConnectivityService to streamline connectivity checks and improve state management, ensuring a more reliable online/offline status. - Updated the connection issue page to directly utilize the connectivity status provider, simplifying the connectivity state handling. - Improved offline indicator behavior to provide clearer feedback on connectivity changes. - Enhanced the persistent streaming service to react to connectivity status changes more effectively.
This commit is contained in:
@@ -74,9 +74,9 @@ class PersistentStreamingService with WidgetsBindingObserver {
|
||||
|
||||
_connectivitySubscription?.cancel();
|
||||
_connectivityService = service;
|
||||
_connectivitySubscription = service.isConnected.listen(
|
||||
_handleConnectivityChange,
|
||||
);
|
||||
_connectivitySubscription = service.statusStream
|
||||
.map((status) => status == ConnectivityStatus.online)
|
||||
.listen(_handleConnectivityChange);
|
||||
}
|
||||
|
||||
void _handleConnectivityChange(bool connected) {
|
||||
|
||||
Reference in New Issue
Block a user