StateInitSource_StateInit.fromMap constructor

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

Implementation

StateInitSource_StateInit.fromMap(Map<String, dynamic> map) {
  if (!map.containsKey('type') || map['type'] != 'StateInit') {
    throw ('Wrong map data');
  } else {
    _type = 'StateInit';
  }
  if (map.containsKey('code') && (map['code'] != null)) {
    _code = map['code'];
  } else {
    throw ('Wrong map data');
  }
  if (map.containsKey('data') && (map['data'] != null)) {
    _data = map['data'];
  } else {
    throw ('Wrong map data');
  }
  if (map.containsKey('library')) {
    _library = map['library'];
  }
}