saveAlarm static method

Future<void> saveAlarm(
  1. AlarmSettings alarmSettings
)

Saves alarm info in local storage so we can restore it later in the case app is terminated.

Implementation

static Future<void> saveAlarm(AlarmSettings alarmSettings) => prefs.setString(
      '$prefix${alarmSettings.id}',
      json.encode(alarmSettings.toJson()),
    );