ConfigurationTimer class
Este provider representa la configuración del temporizador (timer) de resolución.
Esta clase gestiona distintas opciones de configuración del temporizador, como la visibilidad del tiempo mientras se ejecuta, alertas al batir récords, y la funcionalidad de inspección previa a la resolución. Además permite controlar si el usuario desea alertas en los ocho y doce segundos en el tiempo de inspección, puediendo elegir el tipo de alerta que prefiera.
Las configuraciones se almacenan en SharedPreferences
para que persistan
entre sesiones del usuario.
Constructors
- ConfigurationTimer({bool hideRunningTime = false, bool recordTimeAlert = true, bool bestAverageAlert = false, bool worstTimeAlert = false, bool isActiveInspection = true, int inspectionSeconds = 15, bool alertAt8And12Seconds = false, InspectionAlertType inspectionAlertType = InspectionAlertType.vibrant})
- Constructor que permite establecer las configuraciones del temporizador.
Properties
- alertAt8And12Seconds → bool
-
Alerta a los 8 y 12 segundos de inspección
final
- bestAverageAlert → bool
-
Indica si se debe mostrar una alerta al superar el mejor promedio personal.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hideRunningTime → bool
-
Indica si se debe ocultar el tiempo mientras se realiza una resolución.
final
- inspectionAlertType → InspectionAlertType
-
Tipo de alerta durante la inspección: "vibration", "sound", "both"
final
- inspectionSeconds → int
-
Tiempo en segundos asignado para la inspección previa a la resolución.
final
- isActiveInspection → bool
-
Define si está habilitada la inspección previa a iniciar la resolución.
final
- recordTimeAlert → bool
-
Indica si se debe mostrar una alerta cuando se bate un nuevo récord personal (PB).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- worstTimeAlert → bool
-
Indica si se debe mostrar una alerta al obtener el peor tiempo registrado (worst PB).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveToPreferences(
SharedPreferences prefs) → Future< void> - Guarda las preferencias de las configuraciones del timer en SharedPreferences.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- preferences ↔ SharedPreferences
-
getter/setter pair
Static Methods
-
returnInspectinoTypeString(
String alertTypeString) → InspectionAlertType -
Método para obtener el tipo de alerta de inspección a partir de un
String
. -
startPreferences(
) → Future< void> - Inicializa las preferencias compartidas para guardar y cargar las configuraciones del timer.