fix. Solución a que no se detenga la música
This commit is contained in:
@@ -2,7 +2,7 @@ import 'dart:async';
|
|||||||
import 'servicio_audio.dart';
|
import 'servicio_audio.dart';
|
||||||
|
|
||||||
/// Opciones predefinidas de timer en minutos.
|
/// Opciones predefinidas de timer en minutos.
|
||||||
const opcionesTimer = [15, 30, 60, 90];
|
const opcionesTimer = [3, 5, 10, 15, 30, 60, 90, 120, 180];
|
||||||
|
|
||||||
/// Servicio de auto-apagado de la radio.
|
/// Servicio de auto-apagado de la radio.
|
||||||
///
|
///
|
||||||
@@ -48,12 +48,25 @@ class ServicioTimer {
|
|||||||
if (restante <= Duration.zero) {
|
if (restante <= Duration.zero) {
|
||||||
_tiempoRestante = Duration.zero;
|
_tiempoRestante = Duration.zero;
|
||||||
_controller.add(_tiempoRestante);
|
_controller.add(_tiempoRestante);
|
||||||
|
|
||||||
|
_timer?.cancel();
|
||||||
|
_timer = null;
|
||||||
|
|
||||||
|
_activo = false;
|
||||||
|
|
||||||
_iniciarFadeOut();
|
_iniciarFadeOut();
|
||||||
cancelar(detenerAudio: false);
|
|
||||||
} else {
|
|
||||||
_tiempoRestante = restante;
|
|
||||||
_controller.add(_tiempoRestante);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// if (restante <= Duration.zero) {
|
||||||
|
// _tiempoRestante = Duration.zero;
|
||||||
|
// _controller.add(_tiempoRestante);
|
||||||
|
// _iniciarFadeOut();
|
||||||
|
// cancelar(detenerAudio: false);
|
||||||
|
// } else {
|
||||||
|
// _tiempoRestante = restante;
|
||||||
|
// _controller.add(_tiempoRestante);
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user