fromMap method

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

Implementation

static ProcessingEvent fromMap(Map<String, dynamic> map) {
  if (map['type'] == 'WillFetchFirstBlock') {
    return ProcessingEvent_WillFetchFirstBlock.fromMap(map);
  }
  if (map['type'] == 'FetchFirstBlockFailed') {
    return ProcessingEvent_FetchFirstBlockFailed.fromMap(map);
  }
  if (map['type'] == 'WillSend') {
    return ProcessingEvent_WillSend.fromMap(map);
  }
  if (map['type'] == 'DidSend') {
    return ProcessingEvent_DidSend.fromMap(map);
  }
  if (map['type'] == 'SendFailed') {
    return ProcessingEvent_SendFailed.fromMap(map);
  }
  if (map['type'] == 'WillFetchNextBlock') {
    return ProcessingEvent_WillFetchNextBlock.fromMap(map);
  }
  if (map['type'] == 'FetchNextBlockFailed') {
    return ProcessingEvent_FetchNextBlockFailed.fromMap(map);
  }
  if (map['type'] == 'MessageExpired') {
    return ProcessingEvent_MessageExpired.fromMap(map);
  }
  throw ('ProcessingEvent unknown from map type');
}