This commit is contained in:
Hamza-Ayed
2024-09-10 03:10:04 +03:00
parent 3135187408
commit 6aeb091719
15 changed files with 419 additions and 284 deletions

View File

@@ -98,18 +98,19 @@ class LoginController extends GetxController {
'token': box.read(BoxName.tokenFCM),
'passengerID': box.read(BoxName.passengerID).toString()
});
Get.defaultDialog(
title: 'Device Change Detected'.tr,
middleText:
'You can only use one device at a time. This device will now be set as your active device.'
.tr,
textConfirm: 'OK'.tr,
confirmTextColor: Colors.white,
onConfirm: () {
Get.back();
Get.offAll(() => const MapPagePassenger());
},
);
// Get.defaultDialog(
// title: 'Device Change Detected'.tr,
// middleText:
// 'You can only use one device at a time. This device will now be set as your active device.'
// .tr,
// textConfirm: 'OK'.tr,
// confirmTextColor: Colors.white,
// onConfirm: () {
// Get.back();
// Get.offAll(() => const MapPagePassenger());
// },
// );
// Get.snackbar('title', 'message');
}
}
Get.offAll(() => const MapPagePassenger());

View File

@@ -20,7 +20,8 @@ import '../functions/sms_controller.dart';
class RegisterController extends GetxController {
final formKey = GlobalKey<FormState>();
final formKey3 = GlobalKey<FormState>();
List<String> countryCodes = ['+1', '+91', '+44'];
String selectedCountryCode = '+1';
TextEditingController firstNameController = TextEditingController();
TextEditingController lastNameController = TextEditingController();
TextEditingController emailController = TextEditingController();
@@ -40,6 +41,11 @@ class RegisterController extends GetxController {
super.onInit();
}
void updateCountryCode(String newCode) {
selectedCountryCode = newCode;
update();
}
void startTimer() {
_timer?.cancel(); // Cancel any existing timer
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {