working sync complete
This commit is contained in:
parent
4862bf47c7
commit
97f2673b55
11 changed files with 61 additions and 100 deletions
20
lib/models/sync_data.dart
Normal file
20
lib/models/sync_data.dart
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/room.dart";
|
||||
part "sync_data.freezed.dart";
|
||||
part "sync_data.g.dart";
|
||||
|
||||
@freezed
|
||||
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,
|
||||
}) = _SyncData;
|
||||
|
||||
factory SyncData.fromJson(Map<String, Object?> json) =>
|
||||
_$SyncDataFromJson(json);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue