forked from Nexus/nexus
WIP subspace support
This commit is contained in:
parent
7e7e6877e2
commit
6e02cce84f
5 changed files with 54 additions and 25 deletions
|
|
@ -2,6 +2,7 @@ import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
|||
import "package:flutter/widgets.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/room.dart";
|
||||
import "package:nexus/models/subspace.dart";
|
||||
part "space.freezed.dart";
|
||||
|
||||
@freezed
|
||||
|
|
@ -12,5 +13,6 @@ abstract class Space with _$Space {
|
|||
IconData? icon,
|
||||
Room? room,
|
||||
required IList<Room> children,
|
||||
required IList<Subspace> subSpaces,
|
||||
}) = _Space;
|
||||
}
|
||||
|
|
|
|||
10
lib/models/subspace.dart
Normal file
10
lib/models/subspace.dart
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/room.dart";
|
||||
part "subspace.freezed.dart";
|
||||
|
||||
@freezed
|
||||
abstract class Subspace with _$Subspace {
|
||||
const factory Subspace({required Room room, required IList<Room> children}) =
|
||||
_Subspace;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue