mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-08-02 03:06:06 -04:00
statenotifier
This commit is contained in:
parent
8f0b4aaba0
commit
7a49497620
15 changed files with 28 additions and 56 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue