StateInitSource_Tvc.fromMap constructor

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

Implementation

StateInitSource_Tvc.fromMap(Map<String, dynamic> map) {
  if (!map.containsKey('type') || map['type'] != 'Tvc') {
    throw ('Wrong map data');
  } else {
    _type = 'Tvc';
  }
  if (map.containsKey('tvc') && (map['tvc'] != null)) {
    _tvc = map['tvc'];
  } else {
    throw ('Wrong map data');
  }
  if (map.containsKey('public_key')) {
    _public_key = map['public_key'];
  }
  if (map.containsKey('init_params')) {
    if (map['init_params'] != null) {
      _init_params = StateInitParams.fromMap(map['init_params']);
    }
  }
}