forked from Henry-Hiles/nexus
wip
This commit is contained in:
parent
6afa169af9
commit
f51d773885
12 changed files with 182 additions and 156 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/room.dart";
|
||||
part "sync_data.freezed.dart";
|
||||
|
|
@ -7,12 +8,12 @@ part "sync_data.g.dart";
|
|||
abstract class SyncData with _$SyncData {
|
||||
const factory SyncData({
|
||||
@Default(false) bool clearState,
|
||||
// required Map<String, AccountData> accountData,
|
||||
@Default({}) Map<String, Room> rooms,
|
||||
@Default([]) List<String> leftRooms,
|
||||
// required List<InvitedRoom> invitedRooms,
|
||||
// required List<SpaceEdge> spaceEdges,
|
||||
@Default([]) List<String> topLevelSpaces,
|
||||
// required IMap<String, AccountData> accountData,
|
||||
@Default(IMap.empty()) IMap<String, Room> rooms,
|
||||
@Default(ISet.empty()) ISet<String> leftRooms,
|
||||
// required IList<InvitedRoom> invitedRooms,
|
||||
// required IList<SpaceEdge> spaceEdges,
|
||||
@Default(IList.empty()) IList<String> topLevelSpaces,
|
||||
}) = _SyncData;
|
||||
|
||||
factory SyncData.fromJson(Map<String, Object?> json) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue