StateInitSource_Message.fromMap constructor

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

Implementation

StateInitSource_Message.fromMap(Map<String, dynamic> map) {
  if (!map.containsKey('type') || map['type'] != 'Message') {
    throw ('Wrong map data');
  } else {
    _type = 'Message';
  }
  if (map.containsKey('source') && (map['source'] != null)) {
    _source = MessageSource.fromMap(map['source']);
  } else {
    throw ('Wrong map data');
  }
}