veilidchat/lib/providers/connection_state.dart
2023-09-30 21:28:45 -04:00

19 lines
482 B
Dart

import 'package:flutter_riverpod/flutter_riverpod.dart';
enum GlobalConnectionState {
detached,
detaching,
attaching,
attachedWeak,
attachedGood,
attachedStrong,
fullyAttached,
overAttached,
}
final globalConnectionState =
StateController<GlobalConnectionState>(GlobalConnectionState.detached);
final globalConnectionStateProvider = StateNotifierProvider<
StateController<GlobalConnectionState>,
GlobalConnectionState>((ref) => globalConnectionState);