QueryFenceListOption.fromMap constructor

QueryFenceListOption.fromMap(
  1. Map map
)

Implementation

QueryFenceListOption.fromMap(Map map)
    : assert(map != null),
      super.fromMap(map) {
  if (map['fenceIds'] != null) {
    fenceIds = <int>[];
    map['fenceId'].forEach((e) {
      fenceIds.add(e as int);
    });
  }
  monitoredPerson = map['monitoredPerson'];
  pageIndex = map['pageIndex'];
  pageSize = map['pageSize'];
  fenceType = map['fenceType'] == null
      ? null
      : FenceType.values[map['fenceType'] as int];

  if (map['coordTypeOutput'] != null) {
    int value = map['coordTypeOutput'] as int;
    if (value >= 0 && value <= 2) {
      coordTypeOutput = CoordType.values[value];
    }
  }
}