OrderBy.fromMap constructor

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

Implementation

OrderBy.fromMap(Map<String, dynamic> map) {
  if (map.containsKey('path') && (map['path'] != null)) {
    _path = map['path'];
  } else {
    throw ('Wrong map data');
  }
  if (map.containsKey('direction') && (map['direction'] != null)) {
    _direction = SortDirection.fromMap(map['direction']);
  } else {
    throw ('Wrong map data');
  }
}