QueryAirdropResponse.fromJson constructor

QueryAirdropResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory QueryAirdropResponse.fromJson(Map<String, dynamic> json) {
  return QueryAirdropResponse(
    id: json.valueAsString<String?>('id', acceptCamelCase: true),
    rewardDenom: json.valueAsString<String?>(
      'reward_denom',
      acceptCamelCase: true,
    ),
    distributionStartDate: json
        .valueTo<google_protobuf_timestamp.Timestamp?, String>(
          key: 'distribution_start_date',
          parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
          acceptCamelCase: true,
        ),
    distributionEndDate: json
        .valueTo<google_protobuf_timestamp.Timestamp?, String>(
          key: 'distribution_end_date',
          parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
          acceptCamelCase: true,
        ),
    clawbackDate: json.valueTo<google_protobuf_timestamp.Timestamp?, String>(
      key: 'clawback_date',
      parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
      acceptCamelCase: true,
    ),
    claimTypeDeadlineDate: json
        .valueTo<google_protobuf_timestamp.Timestamp?, String>(
          key: 'claim_type_deadline_date',
          parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
          acceptCamelCase: true,
        ),
    earlyClaimPenalty: json.valueAsString<String?>(
      'early_claim_penalty',
      acceptCamelCase: true,
    ),
    distributorAddress: json.valueAsString<String?>(
      'distributor_address',
      acceptCamelCase: true,
    ),
    allocatorAddress: json.valueAsString<String?>(
      'allocator_address',
      acceptCamelCase: true,
    ),
    linkerAddress: json.valueAsString<String?>(
      'linker_address',
      acceptCamelCase: true,
    ),
    currentDateIndex: json.valueAsBigInt<BigInt?>(
      'current_date_index',
      acceptCamelCase: true,
    ),
    airdropLength: json.valueAsBigInt<BigInt?>(
      'airdrop_length',
      acceptCamelCase: true,
    ),
  );
}