ProcessingEvent_FetchFirstBlockFailed.fromMap constructor

ProcessingEvent_FetchFirstBlockFailed.fromMap(
  1. Map<String, dynamic> map
)

Implementation

ProcessingEvent_FetchFirstBlockFailed.fromMap(Map<String, dynamic> map) {
  if (!map.containsKey('type') || map['type'] != 'FetchFirstBlockFailed') {
    throw ('Wrong map data');
  } else {
    _type = 'FetchFirstBlockFailed';
  }
  if (map.containsKey('error') && (map['error'] != null)) {
    _error = ClientError.fromMap(map['error']);
  } else {
    throw ('Wrong map data');
  }
}