veilidchat/lib/providers/connection_state.dart
Christien Rioux 7a49497620 statenotifier
2023-09-30 21:11:50 -04:00

19 lines
493 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 = AutoDisposeStateNotifierProvider<
StateController<GlobalConnectionState>,
GlobalConnectionState>((ref) => globalConnectionState);