parent
5ee3449f02
commit
c8e1aef74b
1 changed files with 115 additions and 4 deletions
15
lib/controllers/mutual_rooms.dart
Normal file
15
lib/controllers/mutual_rooms.dart
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||
import "package:nexus/controllers/client.dart";
|
||||
|
||||
class MutualRoomsController(final String userId)
|
||||
extends AsyncNotifier<IList<String>> {
|
||||
@override
|
||||
Future<IList<String>> build() =>
|
||||
ref.read(ClientController.provider.notifier).getMutualRooms(userId);
|
||||
|
||||
static final provider = AsyncNotifierProvider.family
|
||||
.autoDispose<MutualRoomsController, IList<String>, String>(
|
||||
MutualRoomsController.new,
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue