QueryMonitoredStatusByLocationOption.fromMap constructor

QueryMonitoredStatusByLocationOption.fromMap(
  1. Map map
)

Implementation

QueryMonitoredStatusByLocationOption.fromMap(Map map)
    : assert(map != null),
      super.fromMap(map) {
  if (map['fenceIds'] != null) {
    fenceIds = <int>[];
    map['fenceIds'].forEach((e) {
      fenceIds.add(e as int);
    });
  }
  monitoredPerson = map['monitoredPerson'];
  latLng =
      map['latLng'] == null ? null : LatLng.fromMap(map['latLng'] as Map);
  pageIndex = map['pageIndex'];

  if (map['coordType'] != null) {
    int value = map['coordType'] as int;
    if (value >= 0 && value <= 2) {
      coordType = CoordType.values[value];
    }
  }
  pageSize = map['pageSize'];
  fenceType = map['fenceType'] == null
      ? null
      : FenceType.values[map['fenceType'] as int];
}