BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -3,10 +3,10 @@ import 'package:customer/controllers/category_restaurant_controller.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../widget/restaurant_image_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -32,7 +32,7 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.allNearestRestaurant.isEmpty
|
||||
? Constant.showEmptyView(message: "No Restaurant found".tr())
|
||||
? Constant.showEmptyView(message: "No Restaurant found".tr)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: ListView.builder(
|
||||
@@ -144,7 +144,7 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
|
||||
@@ -6,10 +6,10 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
|
||||
@@ -131,7 +131,7 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
vertical: 4,
|
||||
),
|
||||
child: Text(
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".toUpperCase().tr() : " off".toUpperCase().tr()}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".toUpperCase().tr : " off".toUpperCase().tr}",
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
|
||||
@@ -17,19 +17,20 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/custom_dialog_box.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/utils/preferences.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_map/flutter_map.dart' as flutterMap;
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:latlong2/latlong.dart' as location;
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -93,7 +94,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"No Store Found in Your Area".tr(),
|
||||
"No Store Found in Your Area".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -106,7 +107,7 @@ class HomeScreen extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Currently, there are no available store in your zone. Try changing your location to find nearby options."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -119,7 +120,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Change Zone".tr(),
|
||||
title: "Change Zone".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -230,7 +231,7 @@ class HomeScreen extends StatelessWidget {
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait..."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
|
||||
// ✅ declare it once here!
|
||||
@@ -517,7 +518,7 @@ class HomeScreen extends StatelessWidget {
|
||||
true
|
||||
? 'Искать что угодно'
|
||||
: 'Search the store, item and more...'
|
||||
.tr(),
|
||||
.tr,
|
||||
controller: null,
|
||||
enable: false,
|
||||
backgroundColor:
|
||||
@@ -705,8 +706,7 @@ class HomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"New Arrivals"
|
||||
.tr(),
|
||||
"New Arrivals".tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
@@ -741,7 +741,7 @@ class HomeScreen extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr(),
|
||||
"View all".tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -823,7 +823,7 @@ class HomeScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Highlights for you"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
@@ -853,7 +853,7 @@ class HomeScreen extends StatelessWidget {
|
||||
},
|
||||
child: Text(
|
||||
"View all"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -969,7 +969,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
"Popular Stores"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -1022,7 +1022,7 @@ class HomeScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
"All Stores".tr(),
|
||||
"All Stores".tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -1210,16 +1210,16 @@ class HomeScreen extends StatelessWidget {
|
||||
isDark
|
||||
? AppThemeData.greyDark100
|
||||
: AppThemeData.grey100,
|
||||
value: controller.selectedOrderTypeValue.value.tr(),
|
||||
value: controller.selectedOrderTypeValue.value.tr,
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
items:
|
||||
<String>['Delivery'.tr(), 'TakeAway'.tr()].map((
|
||||
<String>['Delivery'.tr, 'TakeAway'.tr].map((
|
||||
String value,
|
||||
) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(
|
||||
value.tr(),
|
||||
value.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontSize: 16,
|
||||
@@ -1244,12 +1244,12 @@ class HomeScreen extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Alert".tr(),
|
||||
title: "Alert".tr,
|
||||
descriptions:
|
||||
"Do you really want to change the delivery option? Your cart will be empty."
|
||||
.tr(),
|
||||
positiveString: "Ok".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
.tr,
|
||||
positiveString: "Ok".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
positiveClick: () async {
|
||||
await Preferences.setString(
|
||||
Preferences.foodDeliveryType,
|
||||
@@ -1289,7 +1289,7 @@ class HomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
name.tr(),
|
||||
name.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.bold,
|
||||
@@ -1302,7 +1302,7 @@ class HomeScreen extends StatelessWidget {
|
||||
onPress!();
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr(),
|
||||
"View all".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.regular,
|
||||
@@ -1476,7 +1476,7 @@ class PopularRestaurant extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.carRent600,
|
||||
@@ -1781,7 +1781,7 @@ class AllRestaurant extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.carRent600,
|
||||
@@ -2078,7 +2078,7 @@ class NewArrival extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2188,7 +2188,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!,
|
||||
);
|
||||
@@ -2501,7 +2501,7 @@ class OfferView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Upto".tr(),
|
||||
"Upto".tr,
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2516,7 +2516,7 @@ class OfferView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr() : "off".tr()}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr : "off".tr}",
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2565,7 +2565,7 @@ class OfferView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -2651,7 +2651,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(),
|
||||
@@ -2663,7 +2663,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(),
|
||||
@@ -2683,7 +2683,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);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2757,7 +2757,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(),
|
||||
@@ -2769,7 +2769,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(),
|
||||
@@ -2789,7 +2789,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);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2973,7 +2973,7 @@ class StoryView extends StatelessWidget {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${"Error".tr()}: ${snapshot.error}',
|
||||
'${"Error".tr}: ${snapshot.error}',
|
||||
),
|
||||
);
|
||||
} else if (snapshot.data == null) {
|
||||
@@ -3401,7 +3401,7 @@ class MapView extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Free Delivery"
|
||||
.tr(),
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
14,
|
||||
|
||||
@@ -18,17 +18,18 @@ import 'package:customer/themes/custom_dialog_box.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.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/utils/preferences.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_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';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../models/banner_model.dart';
|
||||
@@ -73,7 +74,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
Image.asset("assets/images/location.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"No Store Found in Your Area".tr(),
|
||||
"No Store Found in Your Area".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -86,7 +87,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Currently, there are no available store in your zone. Try changing your location to find nearby options."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -99,7 +100,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Change Zone".tr(),
|
||||
title: "Change Zone".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -159,7 +160,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"Login".tr(),
|
||||
"Login".tr,
|
||||
textAlign:
|
||||
TextAlign.center,
|
||||
style: TextStyle(
|
||||
@@ -213,8 +214,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait..."
|
||||
.tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
|
||||
// ✅ declare once for whole method
|
||||
@@ -442,9 +442,9 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
) ==
|
||||
true
|
||||
? 'Search the dish, foo and more...'
|
||||
.tr()
|
||||
.tr
|
||||
: 'Search the store, item and more...'
|
||||
.tr(),
|
||||
.tr,
|
||||
controller: null,
|
||||
enable: false,
|
||||
prefix: Padding(
|
||||
@@ -564,7 +564,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Highlights for you"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
@@ -594,7 +594,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
},
|
||||
child: Text(
|
||||
"See all"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -786,16 +786,16 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
DropdownButton<String>(
|
||||
isDense: false,
|
||||
underline: const SizedBox(),
|
||||
value: controller.selectedOrderTypeValue.value.tr(),
|
||||
value: controller.selectedOrderTypeValue.value.tr,
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
items:
|
||||
<String>['Delivery'.tr(), 'TakeAway'.tr()].map((
|
||||
<String>['Delivery'.tr, 'TakeAway'.tr].map((
|
||||
String value,
|
||||
) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(
|
||||
value.tr(),
|
||||
value.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontSize: 16,
|
||||
@@ -820,12 +820,12 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Alert".tr(),
|
||||
title: "Alert".tr,
|
||||
descriptions:
|
||||
"Do you really want to change the delivery option? Your cart will be empty."
|
||||
.tr(),
|
||||
positiveString: "Ok".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
.tr,
|
||||
positiveString: "Ok".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
positiveClick: () async {
|
||||
await Preferences.setString(
|
||||
Preferences.foodDeliveryType,
|
||||
@@ -887,7 +887,7 @@ class CategoryView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Our Categories".tr(),
|
||||
"Our Categories".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color:
|
||||
@@ -903,7 +903,7 @@ class CategoryView extends StatelessWidget {
|
||||
Get.to(const ViewAllCategoryScreen());
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr(),
|
||||
"See all".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -918,7 +918,7 @@ class CategoryView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
GradientText(
|
||||
'Best Servings Food'.tr(),
|
||||
'Best Servings Food'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontFamily: 'Inter Tight',
|
||||
@@ -1022,7 +1022,7 @@ class OfferView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Large Discounts".tr(),
|
||||
"Large Discounts".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color:
|
||||
@@ -1045,7 +1045,7 @@ class OfferView extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr(),
|
||||
"See all".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -1060,7 +1060,7 @@ class OfferView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
GradientText(
|
||||
'Save Upto 50% Off'.tr(),
|
||||
'Save Upto 50% Off'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontFamily: 'Inter Tight',
|
||||
@@ -1152,7 +1152,7 @@ class OfferView extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
RoundedButtonFill(
|
||||
title:
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr() : "off".tr()}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr : "off".tr}",
|
||||
color:
|
||||
Colors.primaries[Random().nextInt(
|
||||
Colors.primaries.length,
|
||||
@@ -1207,7 +1207,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(),
|
||||
);
|
||||
@@ -1218,7 +1218,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(),
|
||||
@@ -1237,7 +1237,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);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1288,7 +1288,7 @@ class StoryView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Stories".tr(),
|
||||
"Stories".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color:
|
||||
@@ -1302,7 +1302,7 @@ class StoryView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
GradientText(
|
||||
'Best Food Stories Ever'.tr(),
|
||||
'Best Food Stories Ever'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontFamily: 'Inter Tight',
|
||||
@@ -1370,7 +1370,7 @@ class StoryView extends StatelessWidget {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${"Error".tr()}: ${snapshot.error}',
|
||||
'${"Error".tr}: ${snapshot.error}',
|
||||
),
|
||||
);
|
||||
} else if (snapshot.data == null) {
|
||||
@@ -1423,7 +1423,7 @@ class StoryView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum!.toStringAsFixed(0))} ${'reviews'.tr()}",
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum!.toStringAsFixed(0))} ${'reviews'.tr}",
|
||||
textAlign:
|
||||
TextAlign.center,
|
||||
maxLines: 1,
|
||||
@@ -1491,7 +1491,7 @@ class RestaurantView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Best Restaurants".tr(),
|
||||
"Best Restaurants".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color:
|
||||
@@ -1511,7 +1511,7 @@ class RestaurantView extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr(),
|
||||
"See all".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -1613,7 +1613,7 @@ class RestaurantView extends StatelessWidget {
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Upto".tr(),
|
||||
"Upto".tr,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -1632,7 +1632,7 @@ class RestaurantView extends StatelessWidget {
|
||||
discountAmountTempList
|
||||
.reduce(min)
|
||||
.toString() +
|
||||
"% OFF".tr(),
|
||||
"% OFF".tr,
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -1707,7 +1707,7 @@ class RestaurantView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
|
||||
@@ -4,11 +4,11 @@ import 'package:customer/models/favourite_model.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../widget/restaurant_image_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -217,7 +217,7 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
"Free Delivery".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
|
||||
@@ -5,10 +5,10 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/story_view/controller/story_controller.dart';
|
||||
import 'package:customer/widget/story_view/utils.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../widget/story_view/widgets/story_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -117,7 +117,7 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text('${"Error".tr()}: ${snapshot.error}'),
|
||||
child: Text('${"Error".tr}: ${snapshot.error}'),
|
||||
);
|
||||
return Center(child: Text('Error: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
@@ -167,7 +167,7 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum.toString())} ${'reviews'.tr()}",
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum.toString())} ${'reviews'.tr}",
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(
|
||||
|
||||
@@ -3,9 +3,9 @@ import 'package:customer/controllers/view_all_category_controller.dart';
|
||||
import 'package:customer/models/vendor_category_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'category_restaurant_screen.dart';
|
||||
|
||||
@@ -26,7 +26,7 @@ class ViewAllCategoryScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Categories".tr(),
|
||||
"Categories".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
|
||||
Reference in New Issue
Block a user