saveToPreferences method
- SharedPreferences prefs
Guarda las preferencias de las configuraciones del timer en SharedPreferences.
Este método guarda cada una de las configuraciones para que puedan ser recuperadas.
Implementation
Future<void> saveToPreferences(SharedPreferences prefs) async {
await prefs.setBool("hideRunningTime", hideRunningTime);
await prefs.setBool("recordTimeAlert", recordTimeAlert);
await prefs.setBool("bestAverageAlert", bestAverageAlert);
await prefs.setBool("worstTimeAlert", worstTimeAlert);
await prefs.setBool("isActiveInspection", isActiveInspection);
await prefs.setInt("inspectionSeconds", inspectionSeconds);
await prefs.setBool("alertAt8And12Seconds", alertAt8And12Seconds);
await prefs.setString("inspectionAlertType", inspectionAlertType.toString());
}