BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -28,17 +28,18 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_border.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
import 'package:customer/utils/network_image_widget.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:customer/widget/video_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class HomeECommerceScreen extends StatelessWidget {
|
||||
@@ -76,7 +77,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
Get.offAll(const LoginScreen());
|
||||
},
|
||||
child: Text(
|
||||
"Login".tr(),
|
||||
"Login".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color:
|
||||
@@ -109,7 +110,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
} else {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
|
||||
// ✅ declare it once here!
|
||||
ShippingAddress shippingAddress = ShippingAddress();
|
||||
@@ -296,7 +297,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: TextFieldWidget(
|
||||
hintText: 'Search the store, item and more...'.tr(),
|
||||
hintText: 'Search the store, item and more...'.tr,
|
||||
controller: null,
|
||||
enable: false,
|
||||
backgroundColor: AppThemeData.grey50,
|
||||
@@ -333,7 +334,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Category".tr(),
|
||||
"Category".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color:
|
||||
@@ -349,7 +350,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
Get.to(const ViewAllCategoryScreen());
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr(),
|
||||
"View all".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
decoration: TextDecoration.underline,
|
||||
@@ -464,7 +465,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Highlights for you".tr(),
|
||||
"Highlights for you".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -489,7 +490,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr(),
|
||||
"View all".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -545,7 +546,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
"New Arrivals".tr(),
|
||||
"New Arrivals".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color:
|
||||
@@ -592,14 +593,14 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
title: 'View All Arrivals'.tr(),
|
||||
title: 'View All Arrivals'.tr,
|
||||
onPress: () {
|
||||
Get.to(
|
||||
RestaurantListScreen(),
|
||||
arguments: {
|
||||
"vendorList":
|
||||
controller.newArrivalRestaurantList,
|
||||
"title": "New Arrivals".tr(),
|
||||
"title": "New Arrivals".tr,
|
||||
},
|
||||
);
|
||||
},
|
||||
@@ -612,7 +613,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Top Brands".tr(),
|
||||
"Top Brands".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color:
|
||||
@@ -776,7 +777,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Style up with the latest fits, now at unbeatable prices."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.regularTextStyle(
|
||||
@@ -1168,7 +1169,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Text(
|
||||
// "Highlights for you".tr(),
|
||||
// "Highlights for you".tr,
|
||||
// textAlign: TextAlign.start,
|
||||
// style: TextStyle(
|
||||
// fontFamily: AppThemeData.semiBold,
|
||||
@@ -1184,7 +1185,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
// });
|
||||
// },
|
||||
// child: Text(
|
||||
// "View all".tr(),
|
||||
// "View all".tr,
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// fontFamily: AppThemeData.regular,
|
||||
@@ -1225,7 +1226,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"All Store".tr(),
|
||||
"All Store".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
color:
|
||||
@@ -1387,7 +1388,7 @@ class HomeECommerceScreen extends StatelessWidget {
|
||||
isDark
|
||||
? AppThemeData.greyDark200
|
||||
: AppThemeData.grey200,
|
||||
title: 'View All Stores'.tr(),
|
||||
title: 'View All Stores'.tr,
|
||||
onPress: () {
|
||||
Get.to(
|
||||
const RestaurantListScreen(),
|
||||
@@ -1526,7 +1527,7 @@ class BannerView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
VendorModel? vendorModel =
|
||||
await FireStoreUtils.getVendorById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1538,7 +1539,7 @@ class BannerView extends StatelessWidget {
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ProductModel? productModel =
|
||||
await FireStoreUtils.getProductById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1558,7 +1559,7 @@ class BannerView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1632,7 +1633,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
VendorModel? vendorModel =
|
||||
await FireStoreUtils.getVendorById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1644,7 +1645,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ProductModel? productModel =
|
||||
await FireStoreUtils.getProductById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1664,7 +1665,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1729,7 +1730,7 @@ class AdvertisementHomeCard extends StatelessWidget {
|
||||
final isDark = themeController.isDark.value;
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
|
||||
model.vendorId!,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user