ClaimMetadata.fromJson constructor
ClaimMetadata.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ClaimMetadata.fromJson(Map<String, dynamic> json) {
return ClaimMetadata(
airdropIdentifier: json.valueAsString<String?>(
'airdrop_identifier',
acceptCamelCase: true,
),
currentRound: json.valueAsString<String?>(
'current_round',
acceptCamelCase: true,
),
currentRoundStart: json
.valueTo<google_protobuf_timestamp.Timestamp?, String>(
key: 'current_round_start',
parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
acceptCamelCase: true,
),
currentRoundEnd: json
.valueTo<google_protobuf_timestamp.Timestamp?, String>(
key: 'current_round_end',
parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
acceptCamelCase: true,
),
);
}