BASE: Switch From EasyLocalization To GetX Localization.

This commit is contained in:
2025-12-04 16:56:39 +05:00
parent 157545f1c0
commit bf1d07a048
218 changed files with 2535 additions and 2313 deletions

View File

@@ -6,10 +6,10 @@ import 'package:customer/utils/utils.dart';
import 'package:customer/widget/osm_map/map_picker_page.dart';
import 'package:customer/widget/place_picker/location_picker_screen.dart';
import 'package:customer/widget/place_picker/selected_location_model.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../controllers/enter_manually_location_controller.dart';
import '../../controllers/theme_controller.dart';
import '../../themes/app_them_data.dart';
@@ -49,8 +49,8 @@ class EnterManuallyLocationScreen extends StatelessWidget {
children: [
Text(
controller.mode == "Edit"
? "Edit Address".tr()
: "Add a New Address".tr(),
? "Edit Address".tr
: "Add a New Address".tr,
style: AppThemeData.boldTextStyle(
fontSize: 24,
color:
@@ -62,7 +62,7 @@ class EnterManuallyLocationScreen extends StatelessWidget {
const SizedBox(height: 10),
Text(
"Enter your location details so we can deliver your orders quickly and accurately."
.tr(),
.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 14,
color: AppThemeData.grey600,
@@ -73,7 +73,7 @@ class EnterManuallyLocationScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Set as Default Address".tr(),
"Set as Default Address".tr,
style: AppThemeData.mediumTextStyle(
fontSize: 14,
color: AppThemeData.grey600,
@@ -154,8 +154,8 @@ class EnterManuallyLocationScreen extends StatelessWidget {
);
},
child: TextFieldWidget(
title: "Choose Location".tr(),
hintText: "Choose Location".tr(),
title: "Choose Location".tr,
hintText: "Choose Location".tr,
readOnly: true,
enable: false,
controller: null,
@@ -234,8 +234,8 @@ class EnterManuallyLocationScreen extends StatelessWidget {
),
const SizedBox(height: 15),
TextFieldWidget(
title: "Flat/House/Floor/Building*".tr(),
hintText: "Enter address details".tr(),
title: "Flat/House/Floor/Building*".tr,
hintText: "Enter address details".tr,
controller:
controller
.houseBuildingTextEditingController
@@ -243,15 +243,15 @@ class EnterManuallyLocationScreen extends StatelessWidget {
),
const SizedBox(height: 15),
TextFieldWidget(
title: "Area/Sector/Locality*".tr(),
hintText: "Enter area/locality".tr(),
title: "Area/Sector/Locality*".tr,
hintText: "Enter area/locality".tr,
controller:
controller.localityEditingController.value,
),
const SizedBox(height: 15),
TextFieldWidget(
title: "Nearby Landmark".tr(),
hintText: "Add a landmark".tr(),
title: "Nearby Landmark".tr,
hintText: "Add a landmark".tr,
controller:
controller.landmarkEditingController.value,
),
@@ -259,7 +259,7 @@ class EnterManuallyLocationScreen extends StatelessWidget {
Container(height: 1, color: AppThemeData.grey200),
const SizedBox(height: 25),
Text(
"Save Address As".tr(),
"Save Address As".tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color: AppThemeData.grey900,
@@ -314,14 +314,14 @@ class EnterManuallyLocationScreen extends StatelessWidget {
const SizedBox(height: 30),
RoundedButtonFill(
borderRadius: 10.r,
title: "Save Address".tr(),
title: "Save Address".tr,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
if (controller.location.value.latitude == null ||
controller.location.value.longitude == null) {
ShowToastDialog.showToast(
"Please select Location".tr(),
"Please select Location".tr,
);
} else if (controller
.houseBuildingTextEditingController
@@ -330,7 +330,7 @@ class EnterManuallyLocationScreen extends StatelessWidget {
.isEmpty) {
ShowToastDialog.showToast(
"Please Enter Flat / House / Floor / Building"
.tr(),
.tr,
);
} else if (controller
.localityEditingController
@@ -338,12 +338,10 @@ class EnterManuallyLocationScreen extends StatelessWidget {
.text
.isEmpty) {
ShowToastDialog.showToast(
"Please Enter Area / Sector / Locality".tr(),
"Please Enter Area / Sector / Locality".tr,
);
} else {
ShowToastDialog.showLoader(
"Please wait...".tr(),
);
ShowToastDialog.showLoader("Please wait...".tr);
//Common values
controller.shippingModel.value.location =