BASE: Initialize Localization.

This commit is contained in:
2025-12-03 18:21:19 +05:00
parent cf58d069ab
commit b04050384d
141 changed files with 1577 additions and 1419 deletions

View File

@@ -1,5 +1,6 @@
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/themes/show_toast_dialog.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -42,7 +43,7 @@ class OtpVerifyController extends GetxController {
codeSent: (String verificationId0, int? resendToken0) async {
verificationId.value = verificationId0;
resendToken.value = resendToken0!;
ShowToastDialog.showToast("OTP sent".tr);
ShowToastDialog.showToast("OTP sent".tr());
},
timeout: const Duration(seconds: 25),
forceResendingToken: resendToken.value,
@@ -55,12 +56,12 @@ class OtpVerifyController extends GetxController {
void verifyOtp() async {
if (otpController.value.text.length != 6) {
ShowToastDialog.showToast("Enter valid 6-digit OTP".tr);
ShowToastDialog.showToast("Enter valid 6-digit OTP".tr());
return;
}
try {
ShowToastDialog.showLoader("Verifying OTP...".tr);
ShowToastDialog.showLoader("Verifying OTP...".tr());
final credential = PhoneAuthProvider.credential(verificationId: verificationId.value, smsCode: otpController.value.text.trim());
@@ -91,7 +92,7 @@ class OtpVerifyController extends GetxController {
}
if (userModel.active == false) {
ShowToastDialog.showToast("This user is disabled".tr);
ShowToastDialog.showToast("This user is disabled".tr());
await _auth.signOut();
Get.offAll(() => const LoginScreen());
return;
@@ -110,7 +111,7 @@ class OtpVerifyController extends GetxController {
}
} catch (e) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Invalid OTP or Verification Failed".tr);
ShowToastDialog.showToast("Invalid OTP or Verification Failed".tr());
}
}