Skip to content

Instantly share code, notes, and snippets.

@ookami-kb
Created June 15, 2020 18:53
Show Gist options
  • Save ookami-kb/8210cec9afc2c42b5572badcb8127462 to your computer and use it in GitHub Desktop.
Save ookami-kb/8210cec9afc2c42b5572badcb8127462 to your computer and use it in GitHub Desktop.
@JsonSerializable()
class MessageDto {
MessageDto({this.id, this.createdUtc, this.text, this.creator});
final String id;
final String createdUtc;
final String text;
final MessageAuthorDto creator;
static MessageDto fromJson(Map<String, dynamic> json) =>
_$MessageDtoFromJson(json);
Map<String, dynamic> toJson() => _$MessageDtoToJson(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment