forked from Nexus/nexus
Now this feature is stable, we should use it. I might have missed some usecases, but these can be added in future commits.
13 lines
379 B
Dart
13 lines
379 B
Dart
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
import "package:nexus/models/client_state.dart";
|
|
|
|
class ClientStateController extends Notifier<ClientState?> {
|
|
@override
|
|
Null build() => null;
|
|
|
|
void set(ClientState newState) => state = newState;
|
|
|
|
static final provider = NotifierProvider<ClientStateController, ClientState?>(
|
|
ClientStateController.new,
|
|
);
|
|
}
|