fromMap method

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

Implementation

static MessageSource fromMap(Map<String, dynamic> map) {
  if (map['type'] == 'Encoded') {
    return MessageSource_Encoded.fromMap(map);
  }
  if (map['type'] == 'EncodingParams') {
    return MessageSource_EncodingParams.fromMap(map);
  }
  throw ('MessageSource unknown from map type');
}