sync changes

This commit is contained in:
2026-05-12 11:25:19 +03:00
parent 3616f84556
commit fdc5aefdd2
25 changed files with 313 additions and 152 deletions

View File

@@ -36,7 +36,6 @@ class _ActiveRideSheetState extends State<ActiveRideSheet> {
_bloc = getIt<ActiveRideBloc>();
_bloc.add(LoadScooterOrder(widget.orderId));
// Локальный таймер для обновления UI каждую секунду
_localTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (mounted && !_bloc.state.isPaused) {
setState(() {});
@@ -60,7 +59,6 @@ class _ActiveRideSheetState extends State<ActiveRideSheet> {
listener: (context, state) {
if (!state.inZone) {
BotToast.showCustomNotification(
// duration: const Duration(seconds: 4),
toastBuilder: (_) {
return NotificationToast(
@@ -125,8 +123,7 @@ class _ActiveRideSheetState extends State<ActiveRideSheet> {
? state.elapsedTime
: state.elapsedTime + (DateTime.now().difference(DateTime.now().subtract(const Duration(seconds: 1))));
// Для отображения текущего времени в реальном времени
final effectiveElapsedTime = state.isPaused
final effectiveElapsedTime = state.isPaused
? state.elapsedTime
: DateTime.now().difference(state.order?.startAt ?? state.order?.createdAt ?? DateTime.now());
@@ -189,7 +186,6 @@ class _ActiveRideSheetState extends State<ActiveRideSheet> {
const SizedBox(height: 20),
// 🔹 ТАЙМЕР
Container(
width: double.infinity,
margin: const EdgeInsets.symmetric(horizontal: 20),