forked from Nexus/nexus
add toJson to all content models
Fixes a regression from the primary constructor content migration
This commit is contained in:
parent
a3ef4f8135
commit
2041b81141
1 changed files with 45 additions and 0 deletions
|
|
@ -14,6 +14,9 @@ class const CreateContent({
|
|||
final String roomVersion = "1",
|
||||
@JsonKey(unknownEnumValue: RoomType.room) final RoomType? type,
|
||||
}) extends Content with _$CreateContent {
|
||||
@override
|
||||
Map<String, Object?> toJson() => _$CreateContentToJson(this);
|
||||
|
||||
factory CreateContent.fromJson(Map<String, Object?> json) =>
|
||||
_$CreateContentFromJson(json);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue