forked from Nexus/nexus
add GomuksEvent model
This commit is contained in:
parent
b4d5a632dd
commit
b154b4ee2e
1 changed files with 114 additions and 93 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:nexus/models/sync_data.dart";
|
||||
|
||||
class TopLevelSpacesController extends Notifier<IList<String>> {
|
||||
@override
|
||||
IList<String> build() => .new();
|
||||
|
||||
void set(IList<String> newSpaces) => state = newSpaces;
|
||||
void handleSync(SyncData sync) => state = sync.topLevelSpaces ?? state;
|
||||
|
||||
static final provider =
|
||||
NotifierProvider<TopLevelSpacesController, IList<String>>(
|
||||
|
|
|
|||
Loading…
Reference in a new issue