v1.1.0+3
This commit is contained in:
@@ -18,7 +18,22 @@ class CalendarScheduleController extends GetxController {
|
||||
loading = false.obs; update();
|
||||
}
|
||||
|
||||
static void openScreen() async {
|
||||
Get.to(() => const CalendarScreen());
|
||||
static void openScreen() async { Get.to(() => const CalendarScreen()); }
|
||||
|
||||
void goToConcreteDay(DateTime day) async {
|
||||
date = (day.copyWith(hour: 12, minute: 0, millisecond: 0, microsecond: 0)).obs;
|
||||
loadSchedule(date.value);
|
||||
}
|
||||
|
||||
void goToPrevDay() async {
|
||||
if(date.value.isBefore(DateTime(2024, 8, 1, 23, 59))) return;
|
||||
date = (date.value.copyWith().subtract(const Duration(days: 1)).copyWith(hour: 12, minute: 0)).obs;
|
||||
loadSchedule(date.value);
|
||||
}
|
||||
|
||||
void goToNextDay() async {
|
||||
if(date.value.isAfter(DateTime(2025, 12, 31))) return;
|
||||
date = (date.value.copyWith().add(const Duration(days: 1)).copyWith(hour: 12, minute: 0)).obs;
|
||||
loadSchedule(date.value);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reverse_nn/application/services/schedule.dart';
|
||||
|
||||
@@ -12,6 +13,7 @@ class ScheduleController extends GetxController {
|
||||
}
|
||||
|
||||
void updateCurrentSchedule() async {
|
||||
if(kDebugMode) { log('update current status'); }
|
||||
currentSchedule = (await ScheduleService().getCurrentStatus()).obs;
|
||||
update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user