- Updated import paths across multiple files to reflect the new package name. - Changed application name and identifiers in CMakeLists.txt, Runner.rc, and other configuration files. - Modified web index.html and manifest.json to update the app title and name. - Adjusted macOS and Windows project settings to align with the new application name. - Ensured consistency in naming across all relevant files and directories.
33 lines
670 B
Dart
33 lines
670 B
Dart
import 'dart:async';
|
|
|
|
import 'package:get/get.dart';
|
|
import 'package:on_field_work/controller/my_controller.dart';
|
|
|
|
class ComingSoonController extends MyController {
|
|
Timer? countdownTimer;
|
|
Duration myDuration = Duration(days: 8);
|
|
|
|
void setCountDown() {
|
|
final reduceSecondsBy = 1;
|
|
final seconds = myDuration.inSeconds - reduceSecondsBy;
|
|
if (seconds >= 0) {
|
|
myDuration = Duration(seconds: seconds);
|
|
}
|
|
update();
|
|
}
|
|
|
|
void startTimer() {
|
|
countdownTimer = Timer.periodic(Duration(seconds: 1), (_) => setCountDown());
|
|
}
|
|
|
|
@override
|
|
void onInit() {
|
|
startTimer();
|
|
super.onInit();
|
|
}
|
|
|
|
void goToBack() {
|
|
Get.back();
|
|
}
|
|
}
|