BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -6,11 +6,11 @@ import 'package:customer/models/user_model.dart';
|
||||
import 'package:customer/screen_ui/location_enable_screens/enter_manually_location.dart';
|
||||
import 'package:customer/themes/app_them_data.dart' show AppThemeData;
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AddressListScreen extends StatelessWidget {
|
||||
const AddressListScreen({super.key});
|
||||
@@ -40,7 +40,7 @@ class AddressListScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"My Addresses".tr(),
|
||||
"My Addresses".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -52,7 +52,7 @@ class AddressListScreen extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Allows users to view, manage, add, or edit delivery addresses."
|
||||
.tr(),
|
||||
.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey600,
|
||||
@@ -63,7 +63,7 @@ class AddressListScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.shippingAddressList.isEmpty
|
||||
? Constant.showEmptyView(
|
||||
message: "Address not found".tr(),
|
||||
message: "Address not found".tr,
|
||||
)
|
||||
: ListView.separated(
|
||||
itemCount:
|
||||
@@ -143,7 +143,7 @@ class AddressListScreen extends StatelessWidget {
|
||||
vertical: 5,
|
||||
),
|
||||
child: Text(
|
||||
"Default".tr(),
|
||||
"Default".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 12,
|
||||
color:
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -7,15 +7,16 @@ import 'package:customer/screen_ui/service_home_screen/service_list_screen.dart'
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:customer/utils/app_router.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:geocoding/geocoding.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/assets.dart';
|
||||
import '../../utils/utils.dart';
|
||||
|
||||
@@ -40,7 +41,7 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 25),
|
||||
child: Text(
|
||||
ConstTexts.enableLocation.tr(),
|
||||
ConstTexts.enableLocation.tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 24.sp,
|
||||
color:
|
||||
@@ -55,7 +56,7 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
child: Text(
|
||||
ConstTexts.allowLocation.tr(),
|
||||
ConstTexts.allowLocation.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 16.sp,
|
||||
color:
|
||||
@@ -70,12 +71,12 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
fontSizes: 14.sp,
|
||||
title: ConstTexts.useCurrentLocation.tr(),
|
||||
title: ConstTexts.useCurrentLocation.tr,
|
||||
onPress: () async {
|
||||
Constant.checkPermission(
|
||||
context: context,
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShippingAddress addressModel = ShippingAddress();
|
||||
try {
|
||||
await Geolocator.requestPermission();
|
||||
@@ -139,12 +140,12 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
fontSizes: 14.sp,
|
||||
title: ConstTexts.setFromMap.tr(),
|
||||
title: ConstTexts.setFromMap.tr,
|
||||
onPress: () async {
|
||||
Constant.checkPermission(
|
||||
context: context,
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShippingAddress addressModel = ShippingAddress();
|
||||
try {
|
||||
await Geolocator.requestPermission();
|
||||
@@ -232,7 +233,7 @@ class LocationPermissionScreen extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
ConstTexts.enterManuallyLocation.tr(),
|
||||
ConstTexts.enterManuallyLocation.tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16.sp,
|
||||
color:
|
||||
|
||||
Reference in New Issue
Block a user