NetworkStatusResponse.fromJson constructor

NetworkStatusResponse.fromJson(
  1. Map<String, dynamic> map
)

Implementation

factory NetworkStatusResponse.fromJson(Map<String, dynamic> map) {
  return NetworkStatusResponse(
    BlockIdentifier.fromJson(map['current_block_identifier']),
    map['current_block_timestamp'],
    BlockIdentifier.fromJson(map['genesis_block_identifier']),
    (map['peers'] as List).map((e) => Peer.fromJson(e)).toList(),
    map['oldest_block_identifier'],
    map['sync_status'],
  );
}