import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../tools/tools.dart'; enum ConnectionState { detached, detaching, attaching, attachedWeak, attachedGood, attachedStrong, fullyAttached, overAttached, } ExternalStreamState globalConnectionState = ExternalStreamState(ConnectionState.detached); AutoDisposeStreamProvider globalConnectionStateProvider = globalConnectionState.provider();