AlarmConfiguration.fromJson constructor

AlarmConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AlarmConfiguration.fromJson(Map<String, dynamic> json) {
  return AlarmConfiguration(
    alarms: (json['alarms'] as List?)
        ?.whereNotNull()
        .map((e) => Alarm.fromJson(e as Map<String, dynamic>))
        .toList(),
    enabled: json['enabled'] as bool?,
    ignorePollAlarmFailure: json['ignorePollAlarmFailure'] as bool?,
  );
}