Metrics.fromJson constructor

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

Implementation

factory Metrics.fromJson(Map<String, dynamic> json) {
  return Metrics(
    totalSupply: json.valueAsString<String?>(
      'total_supply',
      acceptCamelCase: true,
    ),
    totalMiningSupply: json.valueAsString<String?>(
      'total_mining_supply',
      acceptCamelCase: true,
    ),
    totalMinedTokens: json.valueAsString<String?>(
      'total_mined_tokens',
      acceptCamelCase: true,
    ),
    totalResourceNodesDeposit: json.valueAsString<String?>(
      'total_resource_nodes_deposit',
      acceptCamelCase: true,
    ),
    totalBondedDelegation: json.valueAsString<String?>(
      'total_bonded_delegation',
      acceptCamelCase: true,
    ),
    totalUnbondedDelegation: json.valueAsString<String?>(
      'total_unbonded_delegation',
      acceptCamelCase: true,
    ),
    totalUnbondingDelegation: json.valueAsString<String?>(
      'total_unbonding_delegation',
      acceptCamelCase: true,
    ),
    circulationSupply: json.valueAsString<String?>(
      'circulation_supply',
      acceptCamelCase: true,
    ),
    totalMiningReward: json.valueAsString<String?>(
      'total_mining_reward',
      acceptCamelCase: true,
    ),
    chainMiningReward: json.valueAsString<String?>(
      'chain_mining_reward',
      acceptCamelCase: true,
    ),
    resourceMiningReward: json.valueAsString<String?>(
      'resource_mining_reward',
      acceptCamelCase: true,
    ),
    metaMiningReward: json.valueAsString<String?>(
      'meta_mining_reward',
      acceptCamelCase: true,
    ),
    resourceNodeDeposit: json.valueAsString<String?>(
      'resource_node_deposit',
      acceptCamelCase: true,
    ),
    metaNodeDeposit: json.valueAsString<String?>(
      'meta_node_deposit',
      acceptCamelCase: true,
    ),
    unissuedPrepay: json.valueAsString<String?>(
      'unissued_prepay',
      acceptCamelCase: true,
    ),
  );
}