Skip to content

Instantly share code, notes, and snippets.

@mono0926
Created August 30, 2022 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mono0926/28bbec767450ab51c813d562686297a0 to your computer and use it in GitHub Desktop.
Save mono0926/28bbec767450ab51c813d562686297a0 to your computer and use it in GitHub Desktop.
@freezed
class User with _$User {
@JsonSerializable()
const factory User(
@JsonKey() String? displayName,
) = _User;
const User._();
factory User.fromJson(JsonMap json) => _$UserFromJson(json);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment