refactor and improve room list
This commit is contained in:
parent
e41efd92c1
commit
e480e6193b
2 changed files with 251 additions and 254 deletions
8
lib/helpers/extensions/get_all_child_rooms.dart
Normal file
8
lib/helpers/extensions/get_all_child_rooms.dart
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:nexus/models/room.dart";
|
||||
import "package:nexus/models/space.dart";
|
||||
|
||||
extension GetAllChildRooms on Space {
|
||||
IList<Room> get allChildRooms =>
|
||||
children.addAll(subSpaces.expand((s) => s.children));
|
||||
}
|
||||
Loading…
Reference in a new issue