ParamsOfWaitForCollection.fromMap constructor

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

Implementation

ParamsOfWaitForCollection.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');
  }
  if (map.containsKey('timeout')) {
    _timeout = map['timeout'];
  }
}