fromMap method

  1. @override
NotificationSchedule? fromMap(
  1. Map<String, dynamic> mapData
)

Creates a NotificationSchedule instance from a map of data. Returns null if invalid mapData is provided.

Implementation

@override
NotificationSchedule? fromMap(Map<String, dynamic> mapData) {
  timeZone = AwesomeAssertUtils.extractValue(
          NOTIFICATION_SCHEDULE_TIMEZONE, mapData) ??
      timeZone;

  allowWhileIdle = AwesomeAssertUtils.extractValue(
          NOTIFICATION_ALLOW_WHILE_IDLE, mapData) ??
      false;

  repeats = AwesomeAssertUtils.extractValue(
          NOTIFICATION_SCHEDULE_REPEATS, mapData) ??
      false;

  delayTolerance = AwesomeAssertUtils.extractValue(
          NOTIFICATION_SCHEDULE_DELAY_TOLERANCE, mapData) ??
      0;

  preciseAlarm = AwesomeAssertUtils.extractValue(
          NOTIFICATION_SCHEDULE_PRECISE_ALARM, mapData) ??
      false;

  return this;
}