statenotifier

This commit is contained in:
Christien Rioux 2023-09-30 21:00:22 -04:00
parent 8f0b4aaba0
commit 7a49497620
15 changed files with 28 additions and 56 deletions

View file

@ -1,7 +1,5 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../tools/tools.dart';
enum GlobalConnectionState {
detached,
detaching,
@ -13,7 +11,8 @@ enum GlobalConnectionState {
overAttached,
}
ExternalStreamState<GlobalConnectionState> globalConnectionState =
ExternalStreamState<GlobalConnectionState>(GlobalConnectionState.detached);
AutoDisposeStreamProvider<GlobalConnectionState> globalConnectionStateProvider =
globalConnectionState.provider();
final globalConnectionState =
StateController<GlobalConnectionState>(GlobalConnectionState.detached);
final globalConnectionStateProvider = AutoDisposeStateNotifierProvider<
StateController<GlobalConnectionState>,
GlobalConnectionState>((ref) => globalConnectionState);