-
-
Save yaizudamashii/b1734086ba87fbfc2f7f7c9c03d805f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final roomsTileModelStreamProvider = StreamProvider.autoDispose<List<RoomTileViewModel>>((ref) { | |
final database = ref.watch(databaseProvider); | |
if (database != null) { | |
return database.roomsStream().map((rooms) => rooms.map((room) => RoomTileViewModel(room: room)).toList()); | |
} | |
return const Stream.empty(); | |
}); | |
// 略 | |
final roomsTileViewModelStream = watch(roomsTileModelStreamProvider); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment