ParamsOfSubscribeCollection.fromMap constructor

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

Implementation

ParamsOfSubscribeCollection.fromMap(Map<String, dynamic> map) {
  if (map.containsKey('collection') && (map['collection'] != null)) {
    _collection = map['collection'];
  } else {
    throw ('Wrong map data');
  }
  if (map.containsKey('filter')) {
    _filter = map['filter'];
  }
  if (map.containsKey('result') && (map['result'] != null)) {
    _result = map['result'];
  } else {
    throw ('Wrong map data');
  }
}