QueryHistoryAlarmOption.fromMap constructor
QueryHistoryAlarmOption.fromMap(- Map map
)
Implementation
QueryHistoryAlarmOption.fromMap(Map map)
: assert(map != null),
super.fromMap(map) {
if (map['fenceIds'] != null) {
fenceIds = <int>[];
map['fenceIds'].forEach((e) {
fenceIds.add(e as int);
});
}
startTime = map['startTime'];
endTime = map['endTime'];
monitoredPerson = map['monitoredPerson'];
fenceType = 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];
}
}
}