saveAlarm static method
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()),
);