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

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dash_board_controller.dart';
import 'package:customer/controllers/dash_board_ecommarce_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -41,17 +42,17 @@ class DashBoardEcommerceScreen extends StatelessWidget {
items:
Constant.walletSetting == false
? [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
]
: [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet.svg", label: 'Wallet'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr, controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet.svg", label: 'Wallet'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr(), controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
],
),
);

View File

@@ -32,6 +32,7 @@ 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';
@@ -68,7 +69,7 @@ class HomeECommerceScreen extends StatelessWidget {
onTap: () {
Get.offAll(const LoginScreen());
},
child: Text("Login".tr, textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 12)),
child: Text("Login".tr(), textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 12)),
)
: Text(Constant.userModel!.fullName(), textAlign: TextAlign.center, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 12)),
InkWell(
@@ -84,7 +85,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();
@@ -203,7 +204,7 @@ class HomeECommerceScreen extends StatelessWidget {
Get.to(const SearchScreen(), arguments: {"vendorList": controller.allNearestRestaurant});
},
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,
@@ -233,7 +234,7 @@ class HomeECommerceScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Category".tr,
"Category".tr(),
textAlign: TextAlign.start,
style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16),
),
@@ -243,7 +244,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,
@@ -312,7 +313,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, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -324,7 +325,7 @@ class HomeECommerceScreen extends StatelessWidget {
});
},
child: Text(
"View all".tr,
"View all".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
@@ -353,7 +354,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: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16),
),
@@ -382,9 +383,9 @@ class HomeECommerceScreen extends StatelessWidget {
radius: 10,
color: isDark ? AppThemeData.greyDark100 : AppThemeData.grey100,
borderColor: 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});
Get.to(RestaurantListScreen(), arguments: {"vendorList": controller.newArrivalRestaurantList, "title": "New Arrivals".tr()});
},
),
),
@@ -394,7 +395,7 @@ class HomeECommerceScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Top Brands".tr, textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
Text("Top Brands".tr(), textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
SizedBox(height: 10),
GridView.builder(
padding: EdgeInsets.zero,
@@ -466,7 +467,7 @@ class HomeECommerceScreen extends StatelessWidget {
children: [
Text(item.title.toString(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 18)),
Text(
"Style up with the latest fits, now at unbeatable prices.".tr,
"Style up with the latest fits, now at unbeatable prices.".tr(),
textAlign: TextAlign.start,
style: AppThemeData.regularTextStyle(color: AppThemeData.grey900, fontSize: 12),
),
@@ -630,7 +631,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,
@@ -646,7 +647,7 @@ class HomeECommerceScreen extends StatelessWidget {
// });
// },
// child: Text(
// "View all".tr,
// "View all".tr(),
// textAlign: TextAlign.center,
// style: TextStyle(
// fontFamily: AppThemeData.regular,
@@ -686,7 +687,7 @@ class HomeECommerceScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("All Store".tr, textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
Text("All Store".tr(), textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
SizedBox(height: 10),
ListView.builder(
padding: EdgeInsets.zero,
@@ -754,7 +755,7 @@ class HomeECommerceScreen extends StatelessWidget {
radius: 10,
color: isDark ? AppThemeData.greyDark100 : AppThemeData.grey100,
borderColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
title: 'View All Stores'.tr,
title: 'View All Stores'.tr(),
onPress: () {
Get.to(const RestaurantListScreen(), arguments: {"vendorList": controller.allNearestRestaurant});
},
@@ -863,13 +864,13 @@ 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());
ShowToastDialog.closeLoader();
Get.to(const RestaurantDetailsScreen(), 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());
VendorModel? vendorModel = await FireStoreUtils.getVendorById(productModel!.vendorID.toString());
@@ -880,7 +881,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());
}
}
},
@@ -942,13 +943,13 @@ 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());
ShowToastDialog.closeLoader();
Get.to(const RestaurantDetailsScreen(), 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());
VendorModel? vendorModel = await FireStoreUtils.getVendorById(productModel!.vendorID.toString());
@@ -959,7 +960,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());
}
}
},
@@ -1006,7 +1007,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!);
ShowToastDialog.closeLoader();
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});

View File

@@ -6,6 +6,7 @@ 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';
@@ -38,14 +39,14 @@ class AddressListScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("My Addresses".tr, style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("My Addresses".tr(), style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
const SizedBox(height: 5),
Text("Allows users to view, manage, add, or edit delivery addresses.".tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
Text("Allows users to view, manage, add, or edit delivery addresses.".tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
const SizedBox(height: 24),
Expanded(
child:
controller.shippingAddressList.isEmpty
? Constant.showEmptyView(message: "Address not found".tr)
? Constant.showEmptyView(message: "Address not found".tr())
: ListView.separated(
itemCount: controller.shippingAddressList.length,
itemBuilder: (context, index) {
@@ -80,7 +81,7 @@ class AddressListScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
child: Text(
"Default".tr,
"Default".tr(),
style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: isDark ? AppThemeData.greyDark600 : AppThemeData.grey600),
),
),

View File

@@ -6,6 +6,7 @@ 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';
@@ -45,15 +46,15 @@ class EnterManuallyLocationScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
controller.mode == "Edit" ? "Edit Address".tr : "Add a New Address".tr,
controller.mode == "Edit" ? "Edit Address".tr() : "Add a New Address".tr(),
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
const SizedBox(height: 10),
Text("Enter your location details so we can deliver your orders quickly and accurately.".tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
Text("Enter your location details so we can deliver your orders quickly and accurately.".tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600)),
const SizedBox(height: 24),
Row(
children: [
Expanded(child: Text("Set as Default Address".tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600))),
Expanded(child: Text("Set as Default Address".tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey600))),
Transform.scale(
scale: 0.7, // Decrease the size (try 0.5, 0.6, etc.)
child: Switch(
@@ -97,8 +98,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,
@@ -137,15 +138,15 @@ class EnterManuallyLocationScreen extends StatelessWidget {
),
),
const SizedBox(height: 15),
TextFieldWidget(title: "Flat/House/Floor/Building*".tr, hintText: "Enter address details".tr, controller: controller.houseBuildingTextEditingController.value),
TextFieldWidget(title: "Flat/House/Floor/Building*".tr(), hintText: "Enter address details".tr(), controller: controller.houseBuildingTextEditingController.value),
const SizedBox(height: 15),
TextFieldWidget(title: "Area/Sector/Locality*".tr, hintText: "Enter area/locality".tr, controller: controller.localityEditingController.value),
TextFieldWidget(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, controller: controller.landmarkEditingController.value),
TextFieldWidget(title: "Nearby Landmark".tr(), hintText: "Add a landmark".tr(), controller: controller.landmarkEditingController.value),
const SizedBox(height: 30),
Container(height: 1, color: AppThemeData.grey200),
const SizedBox(height: 25),
Text("Save Address As".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
Text("Save Address As".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
const SizedBox(height: 10),
Wrap(
spacing: 10,
@@ -175,18 +176,18 @@ 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);
ShowToastDialog.showToast("Please select Location".tr());
} else if (controller.houseBuildingTextEditingController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Flat / House / Floor / Building".tr);
ShowToastDialog.showToast("Please Enter Flat / House / Floor / Building".tr());
} else if (controller.localityEditingController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Area / Sector / Locality".tr);
ShowToastDialog.showToast("Please Enter Area / Sector / Locality".tr());
} else {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
//Common values
controller.shippingModel.value.location = controller.location.value;

View File

@@ -9,6 +9,7 @@ import 'package:customer/themes/show_toast_dialog.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';
@@ -39,7 +40,7 @@ class LocationPermissionScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25),
child: Text(
"Enable Location for a Personalized Experience".tr,
"Enable Location for a Personalized Experience".tr(),
style: AppThemeData.boldTextStyle(fontSize: 24, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
textAlign: TextAlign.center,
),
@@ -48,7 +49,7 @@ class LocationPermissionScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 50),
child: Text(
"Allow location access to discover beauty stores and services near you.".tr,
"Allow location access to discover beauty stores and services near you.".tr(),
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark600 : AppThemeData.grey600),
textAlign: TextAlign.center,
),
@@ -56,12 +57,12 @@ class LocationPermissionScreen extends StatelessWidget {
const SizedBox(height: 30),
RoundedButtonFill(
borderRadius: 10.r,
title: "Use current location".tr,
title: "Use current location".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();
@@ -107,12 +108,12 @@ class LocationPermissionScreen extends StatelessWidget {
const SizedBox(height: 10),
RoundedButtonFill(
borderRadius: 10.r,
title: "Set from map".tr,
title: "Set from map".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();
@@ -180,7 +181,7 @@ class LocationPermissionScreen extends StatelessWidget {
}
});
},
child: Text("Enter Manually location".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Enter Manually location".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
],
),

View File

@@ -1,4 +1,5 @@
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -15,12 +16,12 @@ class MaintenanceModeScreen extends StatelessWidget {
children: [
Center(child: Image.asset('assets/images/maintenance.png', height: 200, width: 200)),
const SizedBox(height: 20),
Text("We'll be back soon!".tr, style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
Text("We'll be back soon!".tr(), style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Text(
"Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!".tr,
"Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!".tr(),
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),

View File

@@ -6,6 +6,7 @@ import 'package:customer/models/vendor_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
@@ -33,7 +34,7 @@ class AllAdvertisementScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
title: Text(
"Highlights for you".tr,
"Highlights for you".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -42,7 +43,7 @@ class AllAdvertisementScreen extends StatelessWidget {
controller.isLoading.value
? Constant.loader()
: controller.advertisementList.isEmpty
? Constant.showEmptyView(message: "Highlights for you not found.".tr)
? Constant.showEmptyView(message: "Highlights for you not found.".tr())
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ListView.builder(
@@ -72,7 +73,7 @@ class AdvertisementCard 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!);
ShowToastDialog.closeLoader();
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});

View File

@@ -14,6 +14,7 @@ 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/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -44,7 +45,7 @@ class CartScreen extends StatelessWidget {
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface),
body:
cartItem.isEmpty
? Constant.showEmptyView(message: "Item Not available".tr)
? Constant.showEmptyView(message: "Item Not available".tr())
: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -62,7 +63,7 @@ class CartScreen extends StatelessWidget {
controller.selectedAddress.value = shippingAddress;
controller.calculatePrice();
} else {
ShowToastDialog.showToast("Service not available in this area".tr);
ShowToastDialog.showToast("Service not available in this area".tr());
}
}
});
@@ -252,20 +253,20 @@ class CartScreen extends StatelessWidget {
-1) {
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
} else {
if ((productModel!.quantity ?? 0) > (cartProductModel.quantity ?? 0) || productModel!.quantity == -1) {
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
}
} else {
if ((productModel!.quantity ?? 0) > (cartProductModel.quantity ?? 0) || productModel!.quantity == -1) {
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
}
},
@@ -285,7 +286,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Variants".tr,
"Variants".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -324,7 +325,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Addons".tr,
"Addons".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -381,7 +382,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${'Delivery Type'.tr} (${controller.selectedFoodType.value})".tr,
"${'Delivery Type'.tr()} (${controller.selectedFoodType.value})".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -400,13 +401,13 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Instant Delivery".tr,
"Instant Delivery".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
),
const SizedBox(height: 5),
Text(
"Standard".tr,
"Standard".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
),
@@ -415,7 +416,7 @@ class CartScreen extends StatelessWidget {
),
Radio(
value: controller.deliveryType.value,
groupValue: "instant".tr,
groupValue: "instant".tr(),
activeColor: AppThemeData.primary300,
onChanged: (value) {
controller.deliveryType.value = "instant";
@@ -438,7 +439,7 @@ class CartScreen extends StatelessWidget {
},
minDateTime: DateTime.now(),
displaySubmitButton: true,
pickerTitle: Text('Schedule Time'.tr),
pickerTitle: Text('Schedule Time'.tr()),
buttonSingleColor: AppThemeData.primary300,
).show(context);
},
@@ -451,13 +452,13 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Schedule Time".tr,
"Schedule Time".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
),
const SizedBox(height: 5),
Text(
"${'Your preferred time'.tr} ${controller.deliveryType.value == "schedule" ? Constant.timestampToDateTime(Timestamp.fromDate(controller.scheduleDateTime.value)) : ""}",
"${'Your preferred time'.tr()} ${controller.deliveryType.value == "schedule" ? Constant.timestampToDateTime(Timestamp.fromDate(controller.scheduleDateTime.value)) : ""}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
),
@@ -466,7 +467,7 @@ class CartScreen extends StatelessWidget {
),
Radio(
value: controller.deliveryType.value,
groupValue: "schedule".tr,
groupValue: "schedule".tr(),
activeColor: AppThemeData.primary300,
onChanged: (value) {
controller.deliveryType.value = "schedule";
@@ -477,7 +478,7 @@ class CartScreen extends StatelessWidget {
},
minDateTime: controller.scheduleDateTime.value,
displaySubmitButton: true,
pickerTitle: Text('Schedule Time'.tr),
pickerTitle: Text('Schedule Time'.tr()),
buttonSingleColor: AppThemeData.primary300,
).show(context);
},
@@ -497,7 +498,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Offers & Benefits".tr,
"Offers & Benefits".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -520,7 +521,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Apply Coupons".tr,
"Apply Coupons".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -542,7 +543,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Bill Details".tr,
"Bill Details".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -563,7 +564,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Item totals".tr,
"Item totals".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -583,14 +584,14 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Delivery Fee".tr,
"Delivery Fee".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
),
(controller.vendorModel.value.isSelfDelivery == true && Constant.isSelfDeliveryFeature == true)
? Text(
'Free Delivery'.tr,
'Free Delivery'.tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16),
)
@@ -609,7 +610,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Coupon Discount".tr,
"Coupon Discount".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -630,7 +631,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Special Discount".tr,
"Special Discount".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -656,7 +657,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Delivery Tips".tr,
"Delivery Tips".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -668,7 +669,7 @@ class CartScreen extends StatelessWidget {
controller.calculatePrice();
},
child: Text(
"Remove".tr,
"Remove".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
@@ -728,7 +729,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"To Pay".tr,
"To Pay".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -756,7 +757,7 @@ class CartScreen extends StatelessWidget {
children: [
const SizedBox(height: 20),
Text(
"Thanks with a tip!".tr,
"Thanks with a tip!".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -777,7 +778,7 @@ class CartScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Around the clock, our delivery partners make it happen. Show gratitude with a tip..".tr,
"Around the clock, our delivery partners make it happen. Show gratitude with a tip..".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600),
),
@@ -927,7 +928,7 @@ class CartScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 10),
child: Center(
child: Text(
'Other'.tr,
'Other'.tr(),
style: TextStyle(
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
fontSize: 14,
@@ -952,7 +953,7 @@ class CartScreen extends StatelessWidget {
const SizedBox(height: 20),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Column(children: [TextFieldWidget(title: 'Remarks'.tr, controller: controller.reMarkController.value, hintText: 'Write remarks for the store'.tr, maxLine: 4)]),
child: Column(children: [TextFieldWidget(title: 'Remarks'.tr(), controller: controller.reMarkController.value, hintText: 'Write remarks for the store'.tr(), maxLine: 4)]),
),
],
),
@@ -973,14 +974,14 @@ class CartScreen extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text("Cashback Offer".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 13)),
child: Text("Cashback Offer".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 13)),
),
Text(
"${"Cashback Name :".tr} ${controller.bestCashback.value.title ?? ''}",
"${"Cashback Name :".tr()} ${controller.bestCashback.value.title ?? ''}",
style: TextStyle(color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontSize: 13),
),
Text(
"${"You will get".tr} ${Constant.amountShow(amount: controller.bestCashback.value.cashbackValue?.toStringAsFixed(2))} ${"cashback after completing the order.".tr}",
"${"You will get".tr()} ${Constant.amountShow(amount: controller.bestCashback.value.cashbackValue?.toStringAsFixed(2))} ${"cashback after completing the order.".tr()}",
style: TextStyle(color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontSize: 13),
),
],
@@ -1034,7 +1035,7 @@ class CartScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Pay Via".tr,
"Pay Via".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 12),
),
@@ -1060,7 +1061,7 @@ class CartScreen extends StatelessWidget {
: isDark
? AppThemeData.grey800
: AppThemeData.grey100,
title: "Pay Now".tr,
title: "Pay Now".tr(),
height: 5,
color:
controller.selectedPaymentMethod.value != ''
@@ -1071,11 +1072,11 @@ class CartScreen extends StatelessWidget {
fontSizes: 16,
onPress: () async {
if ((controller.couponAmount.value >= 1) && (controller.couponAmount.value > controller.totalAmount.value)) {
ShowToastDialog.showToast("The total price must be greater than or equal to the coupon discount value for the code to apply. Please review your cart total.".tr);
ShowToastDialog.showToast("The total price must be greater than or equal to the coupon discount value for the code to apply. Please review your cart total.".tr());
return;
}
if ((controller.specialDiscountAmount.value >= 1) && (controller.specialDiscountAmount.value > controller.totalAmount.value)) {
ShowToastDialog.showToast("The total price must be greater than or equal to the special discount value for the code to apply. Please review your cart total.".tr);
ShowToastDialog.showToast("The total price must be greater than or equal to the special discount value for the code to apply. Please review your cart total.".tr());
return;
}
if (controller.isOrderPlaced.value == false) {
@@ -1109,7 +1110,7 @@ class CartScreen extends StatelessWidget {
) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.totalAmount.value.toString(), orderId: result.id);
@@ -1117,7 +1118,7 @@ class CartScreen extends StatelessWidget {
});
} else {
controller.isOrderPlaced.value = false;
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
controller.isOrderPlaced.value = false;
}
@@ -1162,16 +1163,16 @@ class CartScreen extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
TextFieldWidget(
title: 'Tips Amount'.tr,
title: 'Tips Amount'.tr(),
controller: controller.tipsController.value,
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
textInputAction: TextInputAction.done,
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
prefix: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Text(Constant.currencyModel!.symbol.tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18)),
child: Text(Constant.currencyModel!.symbol.tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18)),
),
hintText: 'Enter Tips Amount'.tr,
hintText: 'Enter Tips Amount'.tr(),
),
SizedBox(height: 10),
Row(
@@ -1179,7 +1180,7 @@ class CartScreen extends StatelessWidget {
Expanded(
child: RoundedButtonFill(
borderRadius: 10.r,
title: "Cancel".tr,
title: "Cancel".tr(),
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
textColor: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
onPress: () async {
@@ -1191,12 +1192,12 @@ class CartScreen extends StatelessWidget {
Expanded(
child: RoundedButtonFill(
borderRadius: 10.r,
title: "Add".tr,
title: "Add".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
if (controller.tipsController.value.text.isEmpty) {
ShowToastDialog.showToast("Please enter tips Amount".tr);
ShowToastDialog.showToast("Please enter tips Amount".tr());
} else {
controller.deliveryTips.value = double.parse(controller.tipsController.value.text);
controller.calculatePrice();

View File

@@ -6,6 +6,7 @@ import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/text_field_widget.dart';
import 'package:customer/widget/my_separator.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../controllers/theme_controller.dart';
@@ -27,20 +28,20 @@ class CouponListScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Coupon Code".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Coupon Code".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(55),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextFieldWidget(
hintText: 'Enter coupon code'.tr,
hintText: 'Enter coupon code'.tr(),
controller: controller.couponCodeController.value,
suffix: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: InkWell(
onTap: () {
if (controller.couponCodeController.value.text.isEmpty) {
ShowToastDialog.showToast("Please enter coupon code".tr);
ShowToastDialog.showToast("Please enter coupon code".tr());
return;
}
CouponModel? matchedCoupon = controller.couponList.firstWhereOrNull((coupon) => coupon.code!.toLowerCase() == controller.couponCodeController.value.text.toLowerCase());
@@ -52,14 +53,14 @@ class CouponListScreen extends StatelessWidget {
controller.calculatePrice();
Get.back();
} else {
ShowToastDialog.showToast("Coupon code not applied".tr);
ShowToastDialog.showToast("Coupon code not applied".tr());
}
} else {
ShowToastDialog.showToast("Invalid Coupon".tr);
ShowToastDialog.showToast("Invalid Coupon".tr());
}
},
child: Text(
"Apply".tr,
"Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
@@ -93,7 +94,7 @@ class CouponListScreen extends StatelessWidget {
child: RotatedBox(
quarterTurns: -1,
child: Text(
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr}",
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
),
@@ -132,11 +133,11 @@ class CouponListScreen extends StatelessWidget {
controller.calculatePrice();
Get.back();
} else {
ShowToastDialog.showToast("Coupon code not applied".tr);
ShowToastDialog.showToast("Coupon code not applied".tr());
}
},
child: Text(
"Tap To Apply".tr,
"Tap To Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),

View File

@@ -6,6 +6,7 @@ import 'package:customer/models/cart_product_model.dart';
import 'package:customer/screen_ui/ecommarce/dash_board_e_commerce_screen.dart';
import 'package:customer/themes/app_them_data.dart';
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';
@@ -38,12 +39,12 @@ class OrderPlacingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Order Placed".tr,
"Order Placed".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
),
Text(
"Hang tight — your items are being delivered quickly and safely!".tr,
"Hang tight — your items are being delivered quickly and safely!".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
@@ -63,7 +64,7 @@ class OrderPlacingScreen extends StatelessWidget {
const SizedBox(width: 10),
Expanded(
child: Text(
"Order ID".tr,
"Order ID".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
),
@@ -92,12 +93,12 @@ class OrderPlacingScreen extends StatelessWidget {
Center(child: Image.asset("assets/images/ic_timer.gif", height: 140)),
const SizedBox(height: 20),
Text(
"Placing your order".tr,
"Placing your order".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
),
Text(
"Take a moment to review your order before proceeding to checkout.".tr,
"Take a moment to review your order before proceeding to checkout.".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
@@ -117,7 +118,7 @@ class OrderPlacingScreen extends StatelessWidget {
const SizedBox(width: 10),
Expanded(
child: Text(
"Delivery Address".tr,
"Delivery Address".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
),
@@ -150,7 +151,7 @@ class OrderPlacingScreen extends StatelessWidget {
const SizedBox(width: 10),
Expanded(
child: Text(
"Order Summary".tr,
"Order Summary".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
),
@@ -167,12 +168,12 @@ class OrderPlacingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${cartProductModel.quantity} x".tr,
"${cartProductModel.quantity} x".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
Text(
"${cartProductModel.name}".tr,
"${cartProductModel.name}".tr(),
textAlign: TextAlign.start,
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
@@ -196,7 +197,7 @@ class OrderPlacingScreen extends StatelessWidget {
controller.isPlacing.value
? RoundedButtonFill(
borderRadius: 10.r,
title: "Track Order".tr,
title: "Track Order".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
@@ -215,7 +216,7 @@ class OrderPlacingScreen extends StatelessWidget {
)
: RoundedButtonFill(
borderRadius: 10.r,
title: "Track Order".tr,
title: "Track Order".tr(),
height: 5.5,
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
textColor: isDark ? AppThemeData.grey900 : AppThemeData.grey50,

View File

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/cart_controller.dart';
import 'package:customer/themes/app_them_data.dart';
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:get/get.dart';
@@ -26,7 +27,7 @@ class SelectPaymentScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
title: Text(
"Payment Option".tr,
"Payment Option".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.medium,
@@ -42,7 +43,7 @@ class SelectPaymentScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Preferred Payment".tr,
"Preferred Payment".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -92,7 +93,7 @@ class SelectPaymentScreen extends StatelessWidget {
height: 10,
),
Text(
"Other Payment Options".tr,
"Other Payment Options".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -180,7 +181,7 @@ class SelectPaymentScreen extends StatelessWidget {
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
borderRadius: 10.r,
title: "${'Pay Now'.tr} | ${Constant.amountShow(amount: controller.totalAmount.value.toString())}".tr,
title: "${'Pay Now'.tr()} | ${Constant.amountShow(amount: controller.totalAmount.value.toString())}".tr(),
height: 5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,

View File

@@ -1,6 +1,7 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/cashback_controller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -20,7 +21,7 @@ class CashbackOffersListScreen extends StatelessWidget {
appBar: AppBar(
centerTitle: false,
titleSpacing: 0,
title: Text("Cashback Offers".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Cashback Offers".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
),
body:
@@ -59,11 +60,11 @@ class CashbackOffersListScreen extends StatelessWidget {
),
const SizedBox(height: 6),
Text(
"${"Min spent".tr} ${Constant.amountShow(amount: "${controller.cashbackList[index].minimumPurchaseAmount ?? 0.0}")} | ${"Valid till".tr} ${Constant.timestampToDateTime2(controller.cashbackList[index].endDate!)}",
"${"Min spent".tr()} ${Constant.amountShow(amount: "${controller.cashbackList[index].minimumPurchaseAmount ?? 0.0}")} | ${"Valid till".tr()} ${Constant.timestampToDateTime2(controller.cashbackList[index].endDate!)}",
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontSize: 14),
),
Text(
"${"Maximum cashback up to".tr} ${Constant.amountShow(amount: "${controller.cashbackList[index].maximumDiscount ?? 0.0}")}",
"${"Maximum cashback up to".tr()} ${Constant.amountShow(amount: "${controller.cashbackList[index].maximumDiscount ?? 0.0}")}",
style: TextStyle(color: isDark ? AppThemeData.primary200 : AppThemeData.primary300, fontFamily: AppThemeData.regular, fontSize: 14),
),
],

View File

@@ -4,6 +4,7 @@ import 'package:customer/controllers/change_language_controller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/utils/preferences.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../controllers/theme_controller.dart';
@@ -30,11 +31,11 @@ class ChangeLanguageScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Change Language".tr,
"Change Language".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"Select your preferred language for a personalized app experience.".tr,
"Select your preferred language for a personalized app experience.".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
const SizedBox(height: 20),

View File

@@ -5,6 +5,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/chat_controller.dart';
import 'package:customer/models/conversation_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import '../../../controllers/theme_controller.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/cupertino.dart';
@@ -55,7 +56,7 @@ class ChatScreen extends StatelessWidget {
ConversationModel inboxModel = ConversationModel.fromJson(documentSnapshots[index].data() as Map<String, dynamic>);
return chatItemView(isDark, inboxModel.senderId == FireStoreUtils.getCurrentUid(), inboxModel);
},
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance
.collection(
@@ -103,7 +104,7 @@ class ChatScreen extends StatelessWidget {
contentPadding: const EdgeInsets.only(top: 3, left: 10),
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
hintText: 'Type message here....'.tr,
hintText: 'Type message here....'.tr(),
),
onSubmitted: (value) async {
if (controller.messageController.value.text.isNotEmpty) {
@@ -245,7 +246,7 @@ class ChatScreen extends StatelessWidget {
void onCameraClick(BuildContext context, ChatController controller) {
final action = CupertinoActionSheet(
message: Text('Send Media'.tr, style: const TextStyle(fontSize: 15.0)),
message: Text('Send Media'.tr(), style: const TextStyle(fontSize: 15.0)),
actions: <Widget>[
CupertinoActionSheetAction(
isDefaultAction: false,
@@ -257,7 +258,7 @@ class ChatScreen extends StatelessWidget {
controller.sendMessage('', url, '', 'image');
}
},
child: Text("Choose image from gallery".tr),
child: Text("Choose image from gallery".tr()),
),
CupertinoActionSheetAction(
isDefaultAction: false,
@@ -271,7 +272,7 @@ class ChatScreen extends StatelessWidget {
}
}
},
child: Text("Choose video from gallery".tr),
child: Text("Choose video from gallery".tr()),
),
CupertinoActionSheetAction(
isDestructiveAction: false,
@@ -283,7 +284,7 @@ class ChatScreen extends StatelessWidget {
controller.sendMessage('', url, '', 'image');
}
},
child: Text("Take a picture".tr),
child: Text("Take a picture".tr()),
),
// CupertinoActionSheetAction(
// isDestructiveAction: false,
@@ -295,11 +296,11 @@ class ChatScreen extends StatelessWidget {
// controller.sendMessage('', videoContainer.videoUrl, videoContainer.thumbnailUrl, 'video');
// }
// },
// child: Text("Record video".tr),
// child: Text("Record video".tr()),
// )
],
cancelButton: CupertinoActionSheetAction(
child: Text('Cancel'.tr),
child: Text('Cancel'.tr()),
onPressed: () {
Get.back();
},

View File

@@ -5,6 +5,7 @@ import 'package:customer/models/user_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.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';
@@ -27,7 +28,7 @@ class DriverInboxScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Driver Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Driver Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body: FirestorePagination(
//item builder type is compulsory.
@@ -37,7 +38,7 @@ class DriverInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
@@ -113,7 +114,7 @@ class DriverInboxScreen extends StatelessWidget {
);
},
shrinkWrap: true,
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance.collection('chat_driver').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
//Change types customerId

View File

@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -28,7 +29,7 @@ class RestaurantInboxScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Store Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Store Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body: FirestorePagination(
//item builder type is compulsory.
@@ -38,7 +39,7 @@ class RestaurantInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
@@ -115,7 +116,7 @@ class RestaurantInboxScreen extends StatelessWidget {
);
},
shrinkWrap: true,
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance.collection('chat_store').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
//Change types customerId

View File

@@ -1,6 +1,7 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dash_board_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -40,17 +41,17 @@ class DashBoardScreen extends StatelessWidget {
items:
Constant.walletSetting == false
? [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
]
: [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet.svg", label: 'Wallet'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr, controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet.svg", label: 'Wallet'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr(), controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
],
),
);

View File

@@ -1,6 +1,7 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dine_in_booking_details_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -24,7 +25,7 @@ class DineInBookingDetails extends StatelessWidget {
titleSpacing: 0,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
title: Text(
"Dine in Bookings".tr,
"Dine in Bookings".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
),
@@ -43,11 +44,11 @@ class DineInBookingDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${'Order'.tr} ${Constant.orderId(orderId: controller.bookingModel.value.id.toString())}",
"${'Order'.tr()} ${Constant.orderId(orderId: controller.bookingModel.value.id.toString())}",
style: TextStyle(fontSize: 18, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
Text(
"${controller.bookingModel.value.totalGuest} ${'Peoples'.tr}",
"${controller.bookingModel.value.totalGuest} ${'Peoples'.tr()}",
style: TextStyle(fontSize: 14, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
],
@@ -113,7 +114,7 @@ class DineInBookingDetails extends StatelessWidget {
);
},
child: Text(
"View in Map".tr,
"View in Map".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
@@ -133,7 +134,7 @@ class DineInBookingDetails extends StatelessWidget {
}
},
child: Text(
"Call Now".tr,
"Call Now".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
@@ -153,7 +154,7 @@ class DineInBookingDetails extends StatelessWidget {
),
const SizedBox(height: 20),
Text(
"Booking Details".tr,
"Booking Details".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -169,7 +170,7 @@ class DineInBookingDetails extends StatelessWidget {
children: [
Expanded(
child: Text(
"Name".tr,
"Name".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
),
@@ -188,7 +189,7 @@ class DineInBookingDetails extends StatelessWidget {
children: [
Expanded(
child: Text(
"Phone number".tr,
"Phone number".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
),
@@ -207,7 +208,7 @@ class DineInBookingDetails extends StatelessWidget {
children: [
Expanded(
child: Text(
"Date and Time".tr,
"Date and Time".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
),
@@ -226,7 +227,7 @@ class DineInBookingDetails extends StatelessWidget {
children: [
Expanded(
child: Text(
"Guest".tr,
"Guest".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
),
@@ -245,7 +246,7 @@ class DineInBookingDetails extends StatelessWidget {
children: [
Expanded(
child: Text(
"Discount".tr,
"Discount".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
),

View File

@@ -3,6 +3,7 @@ import 'package:customer/controllers/dine_in_booking_controller.dart';
import 'package:customer/models/dine_in_booking_model.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/network_image_widget.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';
@@ -27,7 +28,7 @@ class DineInBookingScreen extends StatelessWidget {
titleSpacing: 0,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
title: Text(
"Dine in Bookings".tr,
"Dine in Bookings".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
),
@@ -57,7 +58,7 @@ class DineInBookingScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(
"Upcoming".tr,
"Upcoming".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -88,7 +89,7 @@ class DineInBookingScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(
"History".tr,
"History".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -118,7 +119,7 @@ class DineInBookingScreen extends StatelessWidget {
child:
controller.isFeature.value
? controller.featureList.isEmpty
? Constant.showEmptyView(message: "Upcoming Booking not found.".tr)
? Constant.showEmptyView(message: "Upcoming Booking not found.".tr())
: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.zero,
@@ -130,7 +131,7 @@ class DineInBookingScreen extends StatelessWidget {
},
)
: controller.historyList.isEmpty
? Constant.showEmptyView(message: "History not found.".tr)
? Constant.showEmptyView(message: "History not found.".tr())
: ListView.builder(
itemCount: controller.historyList.length,
shrinkWrap: true,
@@ -208,7 +209,7 @@ class DineInBookingScreen extends StatelessWidget {
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Text("Name".tr, style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400))),
Expanded(child: Text("Name".tr(), style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400))),
Expanded(
child: Text(
"${orderModel.guestFirstName} ${orderModel.guestLastName}",
@@ -223,7 +224,7 @@ class DineInBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text("Guest Number".tr, style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400)),
child: Text("Guest Number".tr(), style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400)),
),
Expanded(
child: Text(

View File

@@ -5,6 +5,7 @@ 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/network_image_widget.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';
@@ -27,7 +28,7 @@ class BookTableScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
title: Text("Book Table".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
title: Text("Book Table".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
),
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
@@ -43,7 +44,7 @@ class BookTableScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Numbers of Guests".tr,
"Numbers of Guests".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
),
@@ -105,7 +106,7 @@ class BookTableScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"When are you visiting?".tr,
"When are you visiting?".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
SizedBox(
@@ -151,9 +152,9 @@ class BookTableScreen extends StatelessWidget {
children: [
Text(
Constant.calculateDifference(controller.dateList[index].date.toDate()) == 0
? "Today".tr
? "Today".tr()
: Constant.calculateDifference(controller.dateList[index].date.toDate()) == 1
? "Tomorrow".tr
? "Tomorrow".tr()
: DateFormat('EEE').format(controller.dateList[index].date.toDate()),
style: TextStyle(
fontSize: 12,
@@ -185,7 +186,7 @@ class BookTableScreen extends StatelessWidget {
child: Center(
child: RoundedButtonFill(
borderRadius: 10.r,
title: "${controller.dateList[index].discountPer}%".tr,
title: "${controller.dateList[index].discountPer}%".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
width: 12,
@@ -201,7 +202,7 @@ class BookTableScreen extends StatelessWidget {
),
const SizedBox(height: 10),
Text(
"Select time slot and scroll to see offers".tr,
"Select time slot and scroll to see offers".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -256,7 +257,7 @@ class BookTableScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Special Occasion".tr,
"Special Occasion".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
),
@@ -264,7 +265,7 @@ class BookTableScreen extends StatelessWidget {
onTap: () {
controller.selectedOccasion.value = "";
},
child: Text("Clear".tr, style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
child: Text("Clear".tr(), style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
),
],
),
@@ -282,7 +283,7 @@ class BookTableScreen extends StatelessWidget {
visualDensity: const VisualDensity(horizontal: 0, vertical: -4),
dense: true,
title: Text(
//'${controller.occasionList[i]}'.tr,
//'${controller.occasionList[i]}'.tr(),
controller.getLocalizedOccasion(controller.occasionList[i]),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
@@ -301,7 +302,7 @@ class BookTableScreen extends StatelessWidget {
visualDensity: const VisualDensity(horizontal: 0, vertical: -4),
dense: true,
title: Text(
'Is this your first visit?'.tr,
'Is this your first visit?'.tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
leading: Checkbox(
@@ -319,7 +320,7 @@ class BookTableScreen extends StatelessWidget {
),
const SizedBox(height: 10),
Text(
"Personal Details".tr,
"Personal Details".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -358,11 +359,11 @@ class BookTableScreen extends StatelessWidget {
),
const SizedBox(height: 10),
Text(
"Additional Requests".tr,
"Additional Requests".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
TextFieldWidget(controller: controller.additionRequestController.value, hintText: 'Add message here....'.tr, maxLine: 5),
TextFieldWidget(controller: controller.additionRequestController.value, hintText: 'Add message here....'.tr(), maxLine: 5),
const SizedBox(height: 20),
],
),
@@ -375,7 +376,7 @@ class BookTableScreen extends StatelessWidget {
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
borderRadius: 10.r,
title: "Book Now".tr,
title: "Book Now".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,

View File

@@ -4,6 +4,7 @@ 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 '../../../service/fire_store_utils.dart';
import '../../../themes/show_toast_dialog.dart';
@@ -215,7 +216,7 @@ class DineInDetailsScreen extends StatelessWidget {
Get.to(const ReviewListScreen(), arguments: {"vendorModel": controller.vendorModel.value});
},
child: Text(
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr}",
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr()}",
style: TextStyle(decoration: TextDecoration.underline, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular),
),
),
@@ -226,7 +227,7 @@ class DineInDetailsScreen extends StatelessWidget {
Row(
children: [
Text(
controller.isOpen.value ? "Open".tr : "Close".tr,
controller.isOpen.value ? "Open".tr() : "Close".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -243,7 +244,7 @@ class DineInDetailsScreen extends StatelessWidget {
timeShowBottomSheet(context, controller);
},
child: Text(
"View Timings".tr,
"View Timings".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -259,7 +260,7 @@ class DineInDetailsScreen extends StatelessWidget {
),
Padding(padding: const EdgeInsets.symmetric(horizontal: 10), child: Icon(Icons.circle, size: 5, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500)),
Text(
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost)} ${'for two'.tr}".tr,
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost)} ${'for two'.tr()}".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -277,7 +278,7 @@ class DineInDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 20),
Text(
"Also applicable on food delivery".tr,
"Also applicable on food delivery".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -292,7 +293,7 @@ class DineInDetailsScreen extends StatelessWidget {
InkWell(
onTap: () {
if (Constant.userModel == null) {
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr);
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr());
} else {
Get.to(const BookTableScreen(), arguments: {"vendorModel": controller.vendorModel.value});
}
@@ -326,7 +327,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Table Booking".tr,
"Table Booking".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
@@ -335,7 +336,7 @@ class DineInDetailsScreen extends StatelessWidget {
),
),
Text(
"Quick Conformations".tr,
"Quick Conformations".tr(),
style: TextStyle(
fontSize: 12,
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
@@ -386,7 +387,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Available food delivery".tr,
"Available food delivery".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
@@ -395,7 +396,7 @@ class DineInDetailsScreen extends StatelessWidget {
),
),
Text(
"in 30-45 mins.".tr,
"in 30-45 mins.".tr(),
style: TextStyle(
fontSize: 12,
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
@@ -421,7 +422,7 @@ class DineInDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 20),
Text(
"Menu".tr,
"Menu".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -466,7 +467,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Location, Timing & Costs".tr,
"Location, Timing & Costs".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -508,7 +509,7 @@ class DineInDetailsScreen extends StatelessWidget {
);
},
child: Text(
"View on Map".tr,
"View on Map".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16,
@@ -533,7 +534,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Timing".tr,
"Timing".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16,
@@ -545,7 +546,7 @@ class DineInDetailsScreen extends StatelessWidget {
InkWell(
onTap: () {},
child: Text(
"${controller.vendorModel.value.openDineTime == '' ? "10:00 AM" : controller.vendorModel.value.openDineTime.toString()} ${"To".tr} ${controller.vendorModel.value.closeDineTime == '' ? "10:00 PM" : controller.vendorModel.value.closeDineTime.toString()}",
"${controller.vendorModel.value.openDineTime == '' ? "10:00 AM" : controller.vendorModel.value.openDineTime.toString()} ${"To".tr()} ${controller.vendorModel.value.closeDineTime == '' ? "10:00 PM" : controller.vendorModel.value.closeDineTime.toString()}",
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16,
@@ -573,7 +574,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Cost for Two".tr,
"Cost for Two".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16,
@@ -583,7 +584,7 @@ class DineInDetailsScreen extends StatelessWidget {
),
),
Text(
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost ?? "0.0")} ${'(approx)'.tr}",
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost ?? "0.0")} ${'(approx)'.tr()}",
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16,
@@ -603,7 +604,7 @@ class DineInDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Cuisines".tr,
"Cuisines".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(

View File

@@ -10,6 +10,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/network_image_widget.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';
@@ -80,7 +81,7 @@ class DineInScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"Dine-In Reservations".tr,
"Dine-In Reservations".tr(),
style: TextStyle(
fontSize: 24,
fontFamily: AppThemeData.semiBold,
@@ -93,7 +94,7 @@ class DineInScreen extends StatelessWidget {
),
Text(
"Book a table at your favorite restaurant and enjoy a delightful dining experience."
.tr,
.tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14,
@@ -131,7 +132,7 @@ class DineInScreen 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
@@ -144,7 +145,7 @@ class DineInScreen 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:
@@ -158,7 +159,7 @@ class DineInScreen extends StatelessWidget {
const SizedBox(height: 20),
RoundedButtonFill(
borderRadius: 10.r,
title: "Change Zone".tr,
title: "Change Zone".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -182,7 +183,7 @@ class DineInScreen extends StatelessWidget {
const SizedBox(height: 10),
titleView(
isDark,
"Explore the Categories".tr,
"Explore the Categories".tr(),
() {
Get.to(const ViewAllCategoryDineInScreen());
},
@@ -218,7 +219,7 @@ class DineInScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"New Arrivals".tr,
"New Arrivals".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily:
@@ -244,7 +245,7 @@ class DineInScreen extends StatelessWidget {
);
},
child: Text(
"View all".tr,
"View all".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily:
@@ -316,7 +317,7 @@ class DineInScreen extends StatelessWidget {
vertical: 10,
),
child: Text(
"Popular Stores".tr,
"Popular Stores".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily:
@@ -357,7 +358,7 @@ class DineInScreen extends StatelessWidget {
vertical: 10,
),
child: Text(
"All Stores".tr,
"All Stores".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily:
@@ -425,7 +426,7 @@ class DineInScreen extends StatelessWidget {
onPress!();
},
child: Text(
"View all".tr,
"View all".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: AppThemeData.regular,
@@ -1292,7 +1293,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(),
@@ -1304,7 +1305,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(),
@@ -1324,7 +1325,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());
}
}
},

View File

@@ -3,6 +3,7 @@ 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';
@@ -25,7 +26,7 @@ class ViewAllCategoryDineInScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
title: Text(
"Categories".tr,
"Categories".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,

View File

@@ -6,6 +6,7 @@ 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/network_image_widget.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';
@@ -32,11 +33,11 @@ class EditProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Profile Information".tr,
"Profile Information".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"View and update your personal details, contact information, and preferences.".tr,
"View and update your personal details, contact information, and preferences.".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
const SizedBox(height: 20),
@@ -79,13 +80,13 @@ class EditProfileScreen extends StatelessWidget {
const SizedBox(height: 20),
Row(
children: [
Expanded(child: TextFieldWidget(title: 'First Name'.tr, controller: controller.firstNameController.value, hintText: 'First Name'.tr)),
Expanded(child: TextFieldWidget(title: 'First Name'.tr(), controller: controller.firstNameController.value, hintText: 'First Name'.tr())),
const SizedBox(width: 10),
Expanded(child: TextFieldWidget(title: 'Last Name'.tr, controller: controller.lastNameController.value, hintText: 'Last Name'.tr)),
Expanded(child: TextFieldWidget(title: 'Last Name'.tr(), controller: controller.lastNameController.value, hintText: 'Last Name'.tr())),
],
),
TextFieldWidget(title: 'Email'.tr, textInputType: TextInputType.emailAddress, controller: controller.emailController.value, hintText: 'Email'.tr, enable: false),
TextFieldWidget(title: 'Phone Number'.tr, textInputType: TextInputType.emailAddress, controller: controller.phoneNumberController.value, hintText: 'Phone Number'.tr, enable: false),
TextFieldWidget(title: 'Email'.tr(), textInputType: TextInputType.emailAddress, controller: controller.emailController.value, hintText: 'Email'.tr(), enable: false),
TextFieldWidget(title: 'Phone Number'.tr(), textInputType: TextInputType.emailAddress, controller: controller.phoneNumberController.value, hintText: 'Phone Number'.tr(), enable: false),
],
),
),
@@ -97,7 +98,7 @@ class EditProfileScreen extends StatelessWidget {
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
borderRadius: 10.r,
title: "Save Details".tr,
title: "Save Details".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
@@ -124,7 +125,7 @@ class EditProfileScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(padding: const EdgeInsets.only(top: 15), child: Text("please select".tr, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600))),
Padding(padding: const EdgeInsets.only(top: 15), child: Text("please select".tr(), style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600))),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@@ -135,7 +136,7 @@ class EditProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(onPressed: () => controller.pickFile(source: ImageSource.camera), icon: const Icon(Icons.camera_alt, size: 32)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("camera".tr, style: const TextStyle())),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("camera".tr(), style: const TextStyle())),
],
),
),
@@ -146,7 +147,7 @@ class EditProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(onPressed: () => controller.pickFile(source: ImageSource.gallery), icon: const Icon(Icons.photo_library_sharp, size: 32)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("gallery".tr, style: const TextStyle())),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("gallery".tr(), style: const TextStyle())),
],
),
),

View File

@@ -7,6 +7,7 @@ import 'package:customer/models/vendor_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import '../../../controllers/theme_controller.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/material.dart';
@@ -43,7 +44,7 @@ class FavouriteScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Your Favourites, All in One Place".tr,
"Your Favourites, All in One Place".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
),
@@ -64,18 +65,18 @@ class FavouriteScreen extends StatelessWidget {
Image.asset("assets/images/login.gif", height: 120),
const SizedBox(height: 12),
Text(
"Please Log In to Continue".tr,
"Please Log In to Continue".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold),
),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -113,7 +114,7 @@ class FavouriteScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(
"Favourite Store".tr,
"Favourite Store".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
@@ -134,7 +135,7 @@ class FavouriteScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(
"Favourite Item".tr,
"Favourite Item".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -164,7 +165,7 @@ class FavouriteScreen extends StatelessWidget {
child:
controller.favouriteRestaurant.value
? controller.favouriteVendorList.isEmpty
? Constant.showEmptyView(message: "Favourite Store not found.".tr)
? Constant.showEmptyView(message: "Favourite Store not found.".tr())
: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.zero,
@@ -260,7 +261,7 @@ class FavouriteScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(
fontSize: 14,
color: AppThemeData.success600,
@@ -370,7 +371,7 @@ class FavouriteScreen extends StatelessWidget {
},
)
: controller.favouriteFoodList.isEmpty
? Constant.showEmptyView(message: "Favourite Item not found.".tr)
? Constant.showEmptyView(message: "Favourite Item not found.".tr())
: ListView.builder(
itemCount: controller.favouriteFoodList.length,
shrinkWrap: true,
@@ -384,7 +385,7 @@ class FavouriteScreen extends StatelessWidget {
return Constant.loader();
} else {
if (snapshot.hasError) {
return Center(child: Text('${"error".tr}: ${snapshot.error}'));
return Center(child: Text('${"error".tr()}: ${snapshot.error}'));
} else if (snapshot.data == null) {
return const SizedBox();
} else {
@@ -427,7 +428,7 @@ class FavouriteScreen extends StatelessWidget {
: SvgPicture.asset("assets/icons/ic_veg.svg"),
const SizedBox(width: 5),
Text(
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
style: TextStyle(
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
fontFamily: AppThemeData.semiBold,

View File

@@ -2,6 +2,7 @@ import 'package:customer/controllers/forgot_password_controller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/text_field_widget.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';
@@ -26,13 +27,13 @@ class ForgotPasswordScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Forgot Password".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("No worries!! Well send you reset instructions".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.regular)),
Text("Forgot Password".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("No worries!! Well send you reset instructions".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.regular)),
const SizedBox(height: 32),
TextFieldWidget(
title: 'Email Address'.tr,
title: 'Email Address'.tr(),
controller: controller.emailEditingController.value,
hintText: 'Enter email address'.tr,
hintText: 'Enter email address'.tr(),
prefix: Padding(
padding: const EdgeInsets.all(12),
child: SvgPicture.asset("assets/icons/ic_mail.svg", colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn)),
@@ -40,12 +41,12 @@ class ForgotPasswordScreen extends StatelessWidget {
),
const SizedBox(height: 32),
RoundedButtonFill(
title: "Forgot Password".tr,
title: "Forgot Password".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
if (controller.emailEditingController.value.text.trim().isEmpty) {
ShowToastDialog.showToast("Please enter valid email".tr);
ShowToastDialog.showToast("Please enter valid email".tr());
} else {
controller.forgotPassword();
}

View File

@@ -8,6 +8,7 @@ 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/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -32,7 +33,7 @@ class GiftCardScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
title: Text(
"Customize Gift Card".tr,
"Customize Gift Card".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -97,16 +98,16 @@ class GiftCardScreen extends StatelessWidget {
),
const SizedBox(height: 20),
TextFieldWidget(
title: 'Choose an amount'.tr,
title: 'Choose an amount'.tr(),
controller: controller.amountController.value,
hintText: 'Enter gift card amount'.tr,
hintText: 'Enter gift card amount'.tr(),
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
textInputAction: TextInputAction.done,
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
prefix: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Text(
Constant.currencyModel!.symbol.tr,
Constant.currencyModel!.symbol.tr(),
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18),
),
),
@@ -159,7 +160,7 @@ class GiftCardScreen extends StatelessWidget {
),
),
const SizedBox(height: 40),
TextFieldWidget(title: 'Add Message (Optional)'.tr, controller: controller.messageController.value, hintText: 'Add message here....'.tr, maxLine: 6),
TextFieldWidget(title: 'Add Message (Optional)'.tr(), controller: controller.messageController.value, hintText: 'Add message here....'.tr(), maxLine: 6),
],
),
),
@@ -170,7 +171,7 @@ class GiftCardScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
@@ -178,12 +179,12 @@ class GiftCardScreen extends StatelessWidget {
onPress: () async {
if (controller.amountController.value.text.isNotEmpty) {
if (Constant.userModel == null) {
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr);
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr());
} else {
giftCardBottomSheet(context, controller);
}
} else {
ShowToastDialog.showToast("Please enter Amount".tr);
ShowToastDialog.showToast("Please enter Amount".tr());
}
},
),
@@ -229,7 +230,7 @@ class GiftCardScreen extends StatelessWidget {
padding: const EdgeInsets.all(8),
decoration: ShapeDecoration(color: AppThemeData.ecommerce50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))),
child: Text(
'Complete payment and share this e-gift card with loved ones using any app'.tr,
'Complete payment and share this e-gift card with loved ones using any app'.tr(),
style: TextStyle(color: AppThemeData.ecommerce300, fontSize: 14, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
),
),
@@ -238,7 +239,7 @@ class GiftCardScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Bill Details".tr,
"Bill Details".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -255,7 +256,7 @@ class GiftCardScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Sub Total".tr,
"Sub Total".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -273,7 +274,7 @@ class GiftCardScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Grand Total".tr,
"Grand Total".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -294,7 +295,7 @@ class GiftCardScreen extends StatelessWidget {
const SizedBox(height: 20),
Center(
child: Text(
"${'Gift Card expire'.tr} ${controller.selectedGiftCard.value.expiryDay} ${'days after purchase'.tr}".tr,
"${'Gift Card expire'.tr()} ${controller.selectedGiftCard.value.expiryDay} ${'days after purchase'.tr()}".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey500 : AppThemeData.grey400),
),
@@ -309,7 +310,7 @@ class GiftCardScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "${'Pay'.tr} ${Constant.amountShow(amount: controller.amountController.value.text)}",
title: "${'Pay'.tr()} ${Constant.amountShow(amount: controller.amountController.value.text)}",
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,

View File

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/history_gift_card_controller.dart';
import 'package:customer/models/gift_cards_order_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../controllers/theme_controller.dart';
@@ -26,7 +27,7 @@ class HistoryGiftCard extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16),
child:
controller.giftCardsOrderList.isEmpty
? Constant.showEmptyView(message: "Purchased Gift card not found".tr)
? Constant.showEmptyView(message: "Purchased Gift card not found".tr())
: ListView.builder(
itemCount: controller.giftCardsOrderList.length,
shrinkWrap: true,
@@ -71,7 +72,7 @@ class HistoryGiftCard extends StatelessWidget {
children: [
Expanded(
child: Text(
"Gift Code".tr,
"Gift Code".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
),
@@ -91,7 +92,7 @@ class HistoryGiftCard extends StatelessWidget {
children: [
Expanded(
child: Text(
"Gift Pin".tr,
"Gift Pin".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
),
@@ -157,7 +158,7 @@ class HistoryGiftCard extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Share'.tr,
'Share'.tr(),
style: TextStyle(
color: isDark ? AppThemeData.grey300 : AppThemeData.grey600,
fontSize: 14,
@@ -174,7 +175,7 @@ class HistoryGiftCard extends StatelessWidget {
),
const Expanded(child: SizedBox()),
Text(
giftCardOrderModel.redeem == true ? "Redeemed".tr : "Not Redeem".tr,
giftCardOrderModel.redeem == true ? "Redeemed".tr() : "Not Redeem".tr(),
style: TextStyle(
fontSize: 16,
color: giftCardOrderModel.redeem == true ? AppThemeData.success400 : AppThemeData.danger300,

View File

@@ -7,6 +7,7 @@ import 'package:customer/models/wallet_transaction_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/text_field_widget.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';
@@ -38,25 +39,25 @@ class RedeemGiftCardScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Redeem Gift Card".tr,
"Redeem Gift Card".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"Enter your gift card code to enjoy discounts and special offers on your orders.".tr,
"Enter your gift card code to enjoy discounts and special offers on your orders.".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
const SizedBox(height: 20),
TextFieldWidget(
title: 'Gift Code'.tr,
title: 'Gift Code'.tr(),
controller: controller.giftCodeController.value,
hintText: 'Enter gift code'.tr,
hintText: 'Enter gift code'.tr(),
textInputType: TextInputType.number,
prefix: Padding(padding: const EdgeInsets.all(10), child: SvgPicture.asset("assets/icons/ic_gift_code.svg")),
),
TextFieldWidget(
title: 'Gift Pin'.tr,
title: 'Gift Pin'.tr(),
controller: controller.giftPinController.value,
hintText: 'Enter gift pin'.tr,
hintText: 'Enter gift pin'.tr(),
textInputType: TextInputType.number,
prefix: Padding(padding: const EdgeInsets.all(10), child: SvgPicture.asset("assets/icons/ic_gift_pin.svg")),
),
@@ -70,30 +71,30 @@ class RedeemGiftCardScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "Redeem".tr,
title: "Redeem".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
fontSizes: 16,
onPress: () async {
if (controller.giftCodeController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Gift Code".tr);
ShowToastDialog.showToast("Please Enter Gift Code".tr());
} else if (controller.giftPinController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Gift Pin".tr);
ShowToastDialog.showToast("Please Enter Gift Pin".tr());
} else {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
await FireStoreUtils.checkRedeemCode(controller.giftCodeController.value.text.replaceAll(" ", "")).then((value) async {
if (value != null) {
GiftCardsOrderModel giftCodeModel = value;
if (giftCodeModel.redeem == true) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Gift voucher already redeemed".tr);
ShowToastDialog.showToast("Gift voucher already redeemed".tr());
} else if (giftCodeModel.giftPin != controller.giftPinController.value.text) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Gift Pin Invalid".tr);
ShowToastDialog.showToast("Gift Pin Invalid".tr());
} else if (giftCodeModel.expireDate!.toDate().isBefore(DateTime.now())) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Gift Voucher expire".tr);
ShowToastDialog.showToast("Gift Voucher expire".tr());
} else {
giftCodeModel.redeem = true;
@@ -120,7 +121,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
DashBoardController controller = Get.put(DashBoardController());
controller.selectedIndex.value = 2;
}
ShowToastDialog.showToast("Voucher redeem successfully".tr);
ShowToastDialog.showToast("Voucher redeem successfully".tr());
});
});
}
@@ -128,7 +129,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
}
} else {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Invalid Gift Code".tr);
ShowToastDialog.showToast("Invalid Gift Code".tr());
}
});
}

View File

@@ -4,6 +4,7 @@ import 'package:customer/payment/createRazorPayOrderModel.dart';
import 'package:customer/payment/rozorpayConroller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../controllers/theme_controller.dart';
@@ -26,7 +27,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Payment Option".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Payment Option".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
@@ -35,7 +36,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Preferred Payment".tr,
"Preferred Payment".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -64,7 +65,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
),
const SizedBox(height: 10),
Text(
"Other Payment Options".tr,
"Other Payment Options".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -114,7 +115,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "Pay Now".tr,
title: "Pay Now".tr(),
height: 5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
@@ -144,14 +145,14 @@ class SelectGiftPaymentScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse(controller.amountController.value.text), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.amountController.value.text, orderId: result.id);
}
});
} else {
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
},
),

View File

@@ -3,6 +3,7 @@ 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';
@@ -26,7 +27,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(
@@ -87,7 +88,7 @@ class CategoryRestaurantScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(fontSize: 14, color: AppThemeData.success600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
],

View File

@@ -6,6 +6,7 @@ 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';
@@ -77,7 +78,7 @@ class DiscountRestaurantListScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, 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(overflow: TextOverflow.ellipsis, fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),

View File

@@ -22,6 +22,7 @@ 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';
@@ -92,7 +93,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
@@ -105,7 +106,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:
@@ -118,7 +119,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,
@@ -229,7 +230,7 @@ class HomeScreen extends StatelessWidget {
onTap: () async {
ShowToastDialog.showLoader(
"Please wait..."
.tr,
.tr(),
);
// ✅ declare it once here!
@@ -516,7 +517,7 @@ class HomeScreen extends StatelessWidget {
true
? 'Искать что угодно'
: 'Search the store, item and more...'
.tr,
.tr(),
controller: null,
enable: false,
backgroundColor:
@@ -704,7 +705,7 @@ class HomeScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"New Arrivals".tr,
"New Arrivals".tr(),
textAlign:
TextAlign
.start,
@@ -739,7 +740,7 @@ class HomeScreen extends StatelessWidget {
});
},
child: Text(
"View all".tr,
"View all".tr(),
textAlign:
TextAlign
.center,
@@ -821,7 +822,7 @@ class HomeScreen extends StatelessWidget {
Expanded(
child: Text(
"Highlights for you"
.tr,
.tr(),
textAlign:
TextAlign
.start,
@@ -851,7 +852,7 @@ class HomeScreen extends StatelessWidget {
},
child: Text(
"View all"
.tr,
.tr(),
textAlign:
TextAlign
.center,
@@ -967,7 +968,7 @@ class HomeScreen extends StatelessWidget {
),
child: Text(
"Popular Stores"
.tr,
.tr(),
textAlign:
TextAlign
.center,
@@ -1020,7 +1021,7 @@ class HomeScreen extends StatelessWidget {
vertical: 10,
),
child: Text(
"All Stores".tr,
"All Stores".tr(),
textAlign:
TextAlign
.center,
@@ -1208,16 +1209,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,
@@ -1242,12 +1243,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,
@@ -1287,7 +1288,7 @@ class HomeScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
name.tr,
name.tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.bold,
@@ -1300,7 +1301,7 @@ class HomeScreen extends StatelessWidget {
onPress!();
},
child: Text(
"View all".tr,
"View all".tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: AppThemeData.regular,
@@ -1474,7 +1475,7 @@ class PopularRestaurant extends StatelessWidget {
),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(
fontSize: 14,
color: AppThemeData.carRent600,
@@ -1779,7 +1780,7 @@ class AllRestaurant extends StatelessWidget {
),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(
fontSize: 14,
color: AppThemeData.carRent600,
@@ -2076,7 +2077,7 @@ class NewArrival extends StatelessWidget {
),
const SizedBox(width: 4),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -2186,7 +2187,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!,
);
@@ -2499,7 +2500,7 @@ class OfferView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Upto".tr,
"Upto".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -2514,7 +2515,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(
@@ -2563,7 +2564,7 @@ class OfferView extends StatelessWidget {
),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(
fontSize: 12,
overflow: TextOverflow.ellipsis,
@@ -2649,7 +2650,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(),
@@ -2661,7 +2662,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(),
@@ -2681,7 +2682,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());
}
}
},
@@ -2755,7 +2756,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(),
@@ -2767,7 +2768,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(),
@@ -2787,7 +2788,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());
}
}
},
@@ -2971,7 +2972,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) {
@@ -3399,7 +3400,7 @@ class MapView extends StatelessWidget {
),
Text(
"Free Delivery"
.tr,
.tr(),
style: TextStyle(
fontSize:
14,

View File

@@ -23,6 +23,7 @@ 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';
@@ -69,16 +70,16 @@ class HomeScreenTwo extends StatelessWidget {
children: [
Image.asset("assets/images/location.gif", height: 120),
const SizedBox(height: 12),
Text("No Store Found in Your Area".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("No Store Found in Your Area".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr,
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Change Zone".tr,
title: "Change Zone".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -122,7 +123,7 @@ class HomeScreenTwo extends StatelessWidget {
Get.offAll(const LoginScreen());
},
child: Text(
"Login".tr,
"Login".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 12),
),
@@ -145,7 +146,7 @@ class HomeScreenTwo extends StatelessWidget {
} else {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
// ✅ declare once for whole method
ShippingAddress shippingAddress = ShippingAddress();
@@ -255,8 +256,8 @@ class HomeScreenTwo extends StatelessWidget {
child: TextFieldWidget(
hintText:
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true
? 'Search the dish, foo and more...'.tr
: 'Search the store, item and more...'.tr,
? 'Search the dish, foo and more...'.tr()
: 'Search the store, item and more...'.tr(),
controller: null,
enable: false,
prefix: Padding(padding: const EdgeInsets.symmetric(horizontal: 16), child: SvgPicture.asset("assets/icons/ic_search.svg")),
@@ -299,7 +300,7 @@ class HomeScreenTwo extends StatelessWidget {
children: [
Expanded(
child: Text(
"Highlights for you".tr,
"Highlights for you".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -311,7 +312,7 @@ class HomeScreenTwo extends StatelessWidget {
});
},
child: Text(
"See all".tr,
"See all".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
@@ -417,13 +418,13 @@ 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 value) {
<String>['Delivery'.tr(), 'TakeAway'.tr()].map((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value.tr, style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
child: Text(value.tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
);
}).toList(),
onChanged: (value) async {
@@ -436,10 +437,10 @@ class HomeScreenTwo extends StatelessWidget {
context: context,
builder: (BuildContext context) {
return CustomDialogBox(
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,
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(),
positiveClick: () async {
await Preferences.setString(Preferences.foodDeliveryType, value!);
controller.selectedOrderTypeValue.value = value;
@@ -493,13 +494,13 @@ class CategoryView extends StatelessWidget {
children: [
Row(
children: [
Expanded(child: Text("Our Categories".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
Expanded(child: Text("Our Categories".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
InkWell(
onTap: () {
Get.to(const ViewAllCategoryScreen());
},
child: Text(
"See all".tr,
"See all".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
),
@@ -507,7 +508,7 @@ class CategoryView extends StatelessWidget {
],
),
GradientText(
'Best Servings Food'.tr,
'Best Servings Food'.tr(),
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
gradient: LinearGradient(colors: [Color(0xFF3961F1), Color(0xFF11D0EA)]),
),
@@ -571,7 +572,7 @@ class OfferView extends StatelessWidget {
children: [
Row(
children: [
Expanded(child: Text("Large Discounts".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
Expanded(child: Text("Large Discounts".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
InkWell(
onTap: () {
Get.to(
@@ -580,7 +581,7 @@ class OfferView extends StatelessWidget {
);
},
child: Text(
"See all".tr,
"See all".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
),
@@ -588,7 +589,7 @@ class OfferView extends StatelessWidget {
],
),
GradientText(
'Save Upto 50% Off'.tr,
'Save Upto 50% Off'.tr(),
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
gradient: LinearGradient(colors: [Color(0xFF39F1C5), Color(0xFF97EA11)]),
),
@@ -642,7 +643,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)],
textColor: AppThemeData.grey50,
width: 20,
@@ -694,13 +695,13 @@ 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());
ShowToastDialog.closeLoader();
Get.to(const RestaurantDetailsScreen(), 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());
VendorModel? vendorModel = await FireStoreUtils.getVendorById(productModel!.vendorID.toString());
@@ -711,7 +712,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());
}
}
},
@@ -746,9 +747,9 @@ class StoryView extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(children: [Expanded(child: Text("Stories".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 18)))]),
Row(children: [Expanded(child: Text("Stories".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 18)))]),
GradientText(
'Best Food Stories Ever'.tr,
'Best Food Stories Ever'.tr(),
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
gradient: LinearGradient(colors: [Color(0xFFF1C839), Color(0xFFEA1111)]),
),
@@ -787,7 +788,7 @@ class StoryView extends StatelessWidget {
return Constant.loader();
} else {
if (snapshot.hasError) {
return Center(child: Text('${"Error".tr}: ${snapshot.error}'));
return Center(child: Text('${"Error".tr()}: ${snapshot.error}'));
} else if (snapshot.data == null) {
return const SizedBox();
} else {
@@ -814,7 +815,7 @@ class StoryView extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_star.svg"),
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,
style: const TextStyle(color: AppThemeData.warning300, fontSize: 10, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),
@@ -869,13 +870,13 @@ class RestaurantView extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
child: Row(
children: [
Expanded(child: Text("Best Restaurants".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
Expanded(child: Text("Best Restaurants".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
InkWell(
onTap: () {
Get.to(const RestaurantListScreen(), arguments: {"vendorList": controller.allNearestRestaurant, "title": "Best Restaurants"});
},
child: Text(
"See all".tr,
"See all".tr(),
textAlign: TextAlign.center,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
),
@@ -938,7 +939,7 @@ class RestaurantView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"Upto".tr,
"Upto".tr(),
textAlign: TextAlign.center,
maxLines: 1,
style: TextStyle(
@@ -949,7 +950,7 @@ class RestaurantView extends StatelessWidget {
),
),
Text(
discountAmountTempList.reduce(min).toString() + "% OFF".tr,
discountAmountTempList.reduce(min).toString() + "% OFF".tr(),
textAlign: TextAlign.center,
maxLines: 1,
style: TextStyle(
@@ -1001,7 +1002,7 @@ class RestaurantView extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_free_delivery.svg", width: 18),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(
overflow: TextOverflow.ellipsis,
fontFamily: AppThemeData.medium,

View File

@@ -4,6 +4,7 @@ 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';
@@ -122,7 +123,7 @@ class RestaurantListScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
],

View File

@@ -5,6 +5,7 @@ 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';
@@ -103,7 +104,7 @@ class MoreStoriesState extends State<MoreStories> {
return SizedBox();
} else {
if (snapshot.hasError) {
return Center(child: Text('${"Error".tr}: ${snapshot.error}'));
return Center(child: Text('${"Error".tr()}: ${snapshot.error}'));
return Center(child: Text('Error: ${snapshot.error}'));
} else if (snapshot.data == null) {
return const SizedBox();
@@ -135,7 +136,7 @@ class MoreStoriesState extends State<MoreStories> {
SvgPicture.asset("assets/icons/ic_star.svg"),
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(color: AppThemeData.warning300, fontSize: 12, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),

View File

@@ -3,6 +3,7 @@ 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';
@@ -24,7 +25,7 @@ class ViewAllCategoryScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Categories".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
title: Text("Categories".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
),
body:
controller.isLoading.value

View File

@@ -1,6 +1,7 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/live_tracking_controller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart' as flutterMap;
import 'package:get/get.dart';
@@ -24,7 +25,7 @@ class LiveTrackingScreen extends StatelessWidget {
return Scaffold(
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, title: Text("Live Tracking".tr), centerTitle: false),
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, title: Text("Live Tracking".tr()), centerTitle: false),
body:
Constant.selectedMapType == 'osm'
? flutterMap.FlutterMap(

View File

@@ -8,6 +8,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/network_image_widget.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';
@@ -37,7 +38,7 @@ class OrderDetailsScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Order Details".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Order Details".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body:
controller.isLoading.value
@@ -56,7 +57,7 @@ class OrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${'Order'.tr} ${Constant.orderId(orderId: controller.orderModel.value.id.toString())}".tr,
"${'Order'.tr()} ${Constant.orderId(orderId: controller.orderModel.value.id.toString())}".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 18, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -64,7 +65,7 @@ class OrderDetailsScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: controller.orderModel.value.status.toString().tr,
title: controller.orderModel.value.status.toString().tr(),
color: Constant.statusColor(status: controller.orderModel.value.status.toString()),
width: 32,
height: 4.5,
@@ -125,7 +126,7 @@ class OrderDetailsScreen extends StatelessWidget {
? const SizedBox()
: InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.vendor!.author.toString());
@@ -236,7 +237,7 @@ class OrderDetailsScreen extends StatelessWidget {
? const SizedBox()
: InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.vendor!.author.toString());
@@ -314,7 +315,7 @@ class OrderDetailsScreen extends StatelessWidget {
),
const SizedBox(width: 5),
Text(
"Order Delivered.".tr,
"Order Delivered.".tr(),
textAlign: TextAlign.right,
style: TextStyle(
color: isDark ? AppThemeData.grey100 : AppThemeData.grey800,
@@ -333,8 +334,8 @@ class OrderDetailsScreen extends StatelessWidget {
const SizedBox(width: 5),
Expanded(
child: Text(
"${'Your Order has been Preparing and assign to the driver'.tr}\n${'Preparation Time'.tr} ${controller.orderModel.value.estimatedTimeToPrepare}"
.tr,
"${'Your Order has been Preparing and assign to the driver'.tr()}\n${'Preparation Time'.tr()} ${controller.orderModel.value.estimatedTimeToPrepare}"
.tr(),
textAlign: TextAlign.start,
style: TextStyle(
color: isDark ? AppThemeData.warning400 : AppThemeData.warning400,
@@ -404,7 +405,7 @@ class OrderDetailsScreen extends StatelessWidget {
const SizedBox(width: 10),
InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.driverID.toString());
@@ -450,7 +451,7 @@ class OrderDetailsScreen extends StatelessWidget {
),
const SizedBox(height: 14),
Text(
"Your Order".tr,
"Your Order".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -555,7 +556,7 @@ class OrderDetailsScreen extends StatelessWidget {
Align(
alignment: Alignment.centerRight,
child: RoundedButtonFill(
title: "Rate us".tr,
title: "Rate us".tr(),
height: 3.8,
width: 20,
color: isDark ? AppThemeData.warning300 : AppThemeData.warning300,
@@ -578,7 +579,7 @@ class OrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Variants".tr,
"Variants".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -616,7 +617,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Addons".tr,
"Addons".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -670,7 +671,7 @@ class OrderDetailsScreen extends StatelessWidget {
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// "Delivery Man".tr,
// "Delivery Man".tr(),
// textAlign: TextAlign.start,
// style: TextStyle(
// fontFamily: AppThemeData.semiBold,
@@ -689,7 +690,7 @@ class OrderDetailsScreen extends StatelessWidget {
// ],
// ),
Text(
"Bill Details".tr,
"Bill Details".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -706,7 +707,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Item totals".tr,
"Item totals".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -726,13 +727,13 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Delivery Fee".tr,
"Delivery Fee".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
),
(controller.orderModel.value.vendor?.isSelfDelivery == true)
? Text('Free Delivery'.tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16))
? Text('Free Delivery'.tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16))
: Text(
Constant.amountShow(
amount:
@@ -753,7 +754,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Coupon Discount".tr,
"Coupon Discount".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -774,7 +775,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Special Discount".tr,
"Special Discount".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -800,7 +801,7 @@ class OrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Delivery Tips".tr,
"Delivery Tips".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -860,7 +861,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"To Pay".tr,
"To Pay".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -878,7 +879,7 @@ class OrderDetailsScreen extends StatelessWidget {
),
const SizedBox(height: 14),
Text(
"Order Details".tr,
"Order Details".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -895,17 +896,17 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Delivery type".tr,
"Delivery type".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
),
Text(
controller.orderModel.value.takeAway == true
? "TakeAway".tr
? "TakeAway".tr()
: controller.orderModel.value.scheduleTime == null
? "Standard".tr
: "Schedule".tr,
? "Standard".tr()
: "Schedule".tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.medium,
@@ -926,7 +927,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Payment Method".tr,
"Payment Method".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -944,7 +945,7 @@ class OrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Date and Time".tr,
"Date and Time".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -965,7 +966,7 @@ class OrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Phone Number".tr,
"Phone Number".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -991,7 +992,7 @@ class OrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Remarks".tr,
"Remarks".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -1026,7 +1027,7 @@ class OrderDetailsScreen extends StatelessWidget {
child:
controller.orderModel.value.status == Constant.orderShipped || controller.orderModel.value.status == Constant.orderInTransit
? RoundedButtonFill(
title: "Track Order".tr,
title: "Track Order".tr(),
height: 5.5,
color: AppThemeData.warning300,
textColor: AppThemeData.grey900,
@@ -1035,14 +1036,14 @@ class OrderDetailsScreen extends StatelessWidget {
},
)
: RoundedButtonFill(
title: "Reorder".tr,
title: "Reorder".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
for (var element in controller.orderModel.value.products!) {
controller.addToCart(cartProductModel: element);
ShowToastDialog.showToast("Item Added In a cart".tr);
ShowToastDialog.showToast("Item Added In a cart".tr());
}
},
),

View File

@@ -6,6 +6,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.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';
import '../../../controllers/theme_controller.dart';
@@ -40,16 +41,16 @@ class OrderScreen extends StatelessWidget {
children: [
Image.asset("assets/images/login.gif", height: 120),
const SizedBox(height: 12),
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -74,11 +75,11 @@ class OrderScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"My Order".tr,
"My Order".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"Keep track your delivered, In Progress and Rejected item all in just one place.".tr,
"Keep track your delivered, In Progress and Rejected item all in just one place.".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
],
@@ -109,11 +110,11 @@ class OrderScreen extends StatelessWidget {
dividerColor: Colors.transparent,
indicatorSize: TabBarIndicatorSize.tab,
tabs: [
Padding(padding: const EdgeInsets.symmetric(horizontal: 18), child: Tab(text: 'All'.tr)),
Tab(text: 'In Progress'.tr),
Tab(text: 'Delivered'.tr),
Tab(text: 'Cancelled'.tr),
Tab(text: 'Rejected'.tr),
Padding(padding: const EdgeInsets.symmetric(horizontal: 18), child: Tab(text: 'All'.tr())),
Tab(text: 'In Progress'.tr()),
Tab(text: 'Delivered'.tr()),
Tab(text: 'Cancelled'.tr()),
Tab(text: 'Rejected'.tr()),
],
),
),
@@ -122,7 +123,7 @@ class OrderScreen extends StatelessWidget {
child: TabBarView(
children: [
controller.allList.isEmpty
? Constant.showEmptyView(message: "Order Not Found".tr)
? Constant.showEmptyView(message: "Order Not Found".tr())
: RefreshIndicator(
onRefresh: () => controller.getOrder(),
child: ListView.builder(
@@ -136,7 +137,7 @@ class OrderScreen extends StatelessWidget {
),
),
controller.inProgressList.isEmpty
? Constant.showEmptyView(message: "Order Not Found".tr)
? Constant.showEmptyView(message: "Order Not Found".tr())
: RefreshIndicator(
onRefresh: () => controller.getOrder(),
child: ListView.builder(
@@ -150,7 +151,7 @@ class OrderScreen extends StatelessWidget {
),
),
controller.deliveredList.isEmpty
? Constant.showEmptyView(message: "Order Not Found".tr)
? Constant.showEmptyView(message: "Order Not Found".tr())
: RefreshIndicator(
onRefresh: () => controller.getOrder(),
child: ListView.builder(
@@ -164,7 +165,7 @@ class OrderScreen extends StatelessWidget {
),
),
controller.cancelledList.isEmpty
? Constant.showEmptyView(message: "Order Not Found".tr)
? Constant.showEmptyView(message: "Order Not Found".tr())
: RefreshIndicator(
onRefresh: () => controller.getOrder(),
child: ListView.builder(
@@ -178,7 +179,7 @@ class OrderScreen extends StatelessWidget {
),
),
controller.rejectedList.isEmpty
? Constant.showEmptyView(message: "Order Not Found".tr)
? Constant.showEmptyView(message: "Order Not Found".tr())
: RefreshIndicator(
onRefresh: () => controller.getOrder(),
child: ListView.builder(
@@ -296,11 +297,11 @@ class OrderScreen extends StatelessWidget {
onTap: () {
for (var element in orderModel.products!) {
controller.addToCart(cartProductModel: element);
ShowToastDialog.showToast("Item Added In a cart".tr);
ShowToastDialog.showToast("Item Added In a cart".tr());
}
},
child: Text(
"Reorder".tr,
"Reorder".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
),
@@ -313,7 +314,7 @@ class OrderScreen extends StatelessWidget {
Get.to(const LiveTrackingScreen(), arguments: {"orderModel": orderModel});
},
child: Text(
"Track Order".tr,
"Track Order".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
),
@@ -327,7 +328,7 @@ class OrderScreen extends StatelessWidget {
// Get.off(const OrderPlacingScreen(), arguments: {"orderModel": orderModel});
},
child: Text(
"View Details".tr,
"View Details".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
),

View File

@@ -5,6 +5,7 @@ import 'package:customer/screen_ui/on_demand_service/worker_inbox_screen.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/custom_dialog_box.dart';
import 'package:customer/themes/responsive.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:in_app_review/in_app_review.dart';
import '../../../controllers/theme_controller.dart';
import '../../../service/fire_store_utils.dart';
@@ -51,16 +52,16 @@ class ProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"My Profile".tr,
"My Profile".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"Manage your personal information, preferences, and settings all in one place.".tr,
"Manage your personal information, preferences, and settings all in one place.".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
const SizedBox(height: 20),
Text(
"General Information".tr,
"General Information".tr(),
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -73,18 +74,18 @@ class ProfileScreen extends StatelessWidget {
children: [
Constant.userModel == null
? const SizedBox()
: cardDecoration(isDark, controller, "assets/images/ic_profile.svg", "Profile Information".tr, () {
: cardDecoration(isDark, controller, "assets/images/ic_profile.svg", "Profile Information".tr(), () {
Get.to(const EditProfileScreen());
}),
if (Constant.sectionConstantModel!.dineInActive == true)
cardDecoration(isDark, controller, "assets/images/ic_dinin.svg", "Dine-In".tr, () {
cardDecoration(isDark, controller, "assets/images/ic_dinin.svg", "Dine-In".tr(), () {
Get.to(const DineInScreen());
}),
cardDecoration(isDark, controller, "assets/images/ic_gift.svg", "Gift Card".tr, () {
cardDecoration(isDark, controller, "assets/images/ic_gift.svg", "Gift Card".tr(), () {
Get.to(const GiftCardScreen());
}),
if (Constant.isCashbackActive == true)
cardDecoration(isDark, controller, "assets/icons/ic_cashback_Offer.svg", "Cashback Offers".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_cashback_Offer.svg", "Cashback Offers".tr(), () {
Get.to(const CashbackOffersListScreen());
}),
],
@@ -97,7 +98,7 @@ class ProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Bookings Information".tr,
"Bookings Information".tr(),
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -108,7 +109,7 @@ class ProfileScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
child: Column(
children: [
cardDecoration(isDark, controller, "assets/icons/ic_dinin_order.svg", "Dine-In Booking".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_dinin_order.svg", "Dine-In Booking".tr(), () {
Get.to(const DineInBookingScreen());
}),
],
@@ -120,7 +121,7 @@ class ProfileScreen extends StatelessWidget {
: const SizedBox(),
const SizedBox(height: 10),
Text(
"Preferences".tr,
"Preferences".tr(),
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -131,17 +132,17 @@ class ProfileScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Column(
children: [
cardDecoration(isDark, controller, "assets/icons/ic_change_language.svg", "Change Language".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_change_language.svg", "Change Language".tr(), () {
Get.to(const ChangeLanguageScreen());
}),
cardDecoration(isDark, controller, "assets/icons/ic_light_dark.svg", "Dark Mode".tr, () {}),
cardDecoration(isDark, controller, "assets/icons/ic_light_dark.svg", "Dark Mode".tr(), () {}),
],
),
),
),
const SizedBox(height: 10),
Text(
"Social".tr,
"Social".tr(),
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -154,16 +155,16 @@ class ProfileScreen extends StatelessWidget {
children: [
Constant.userModel == null
? const SizedBox()
: cardDecoration(isDark, controller, "assets/icons/ic_refer.svg", "Refer a Friend".tr, () {
: cardDecoration(isDark, controller, "assets/icons/ic_refer.svg", "Refer a Friend".tr(), () {
Get.to(const ReferFriendScreen());
}),
cardDecoration(isDark, controller, "assets/icons/ic_share.svg", "Share app".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_share.svg", "Share app".tr(), () {
Share.share(
'${'Check out Foodie, your ultimate food delivery application!'.tr} \n\n${'Google Play:'.tr} ${Constant.googlePlayLink} \n\n${'App Store:'.tr} ${Constant.appStoreLink}',
subject: 'Look what I made!'.tr,
'${'Check out Foodie, your ultimate food delivery application!'.tr()} \n\n${'Google Play:'.tr()} ${Constant.googlePlayLink} \n\n${'App Store:'.tr()} ${Constant.appStoreLink}',
subject: 'Look what I made!'.tr(),
);
}),
cardDecoration(isDark, controller, "assets/icons/ic_rate.svg", "Rate the app".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_rate.svg", "Rate the app".tr(), () {
final InAppReview inAppReview = InAppReview.instance;
inAppReview.requestReview();
}),
@@ -178,7 +179,7 @@ class ProfileScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Communication".tr,
"Communication".tr(),
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 10),
@@ -189,16 +190,16 @@ class ProfileScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Column(
children: [
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Store Inbox".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Store Inbox".tr(), () {
Get.to(const RestaurantInboxScreen());
}),
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Driver Inbox".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Driver Inbox".tr(), () {
Get.to(const DriverInboxScreen());
}),
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Provider Inbox".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Provider Inbox".tr(), () {
Get.to(const ProviderInboxScreen());
}),
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Worker Inbox".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Worker Inbox".tr(), () {
Get.to(const WorkerInboxScreen());
}),
],
@@ -208,7 +209,7 @@ class ProfileScreen extends StatelessWidget {
const SizedBox(height: 10),
],
),
Text("Legal".tr, style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
Text("Legal".tr(), style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
const SizedBox(height: 10),
Container(
width: Responsive.width(100, context),
@@ -217,10 +218,10 @@ class ProfileScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Column(
children: [
cardDecoration(isDark, controller, "assets/icons/ic_privacy_policy.svg", "Privacy Policy".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_privacy_policy.svg", "Privacy Policy".tr(), () {
Get.to(const TermsAndConditionScreen(type: "privacy"));
}),
cardDecoration(isDark, controller, "assets/icons/ic_tearm_condition.svg", "Terms and Conditions".tr, () {
cardDecoration(isDark, controller, "assets/icons/ic_tearm_condition.svg", "Terms and Conditions".tr(), () {
Get.to(const TermsAndConditionScreen(type: "termAndCondition"));
}),
],
@@ -237,18 +238,18 @@ class ProfileScreen extends StatelessWidget {
child: Column(
children: [
Constant.userModel == null
? cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log In".tr, () {
? cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log In".tr(), () {
Get.offAll(const LoginScreen());
})
: cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log out".tr, () {
: cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log out".tr(), () {
showDialog(
context: context,
builder: (BuildContext context) {
return CustomDialogBox(
title: "Log out".tr,
descriptions: "Are you sure you want to log out? You will need to enter your credentials to log back in.".tr,
positiveString: "Log out".tr,
negativeString: "Cancel".tr,
title: "Log out".tr(),
descriptions: "Are you sure you want to log out? You will need to enter your credentials to log back in.".tr(),
positiveString: "Log out".tr(),
negativeString: "Cancel".tr(),
positiveClick: () async {
Constant.userModel!.fcmToken = "";
await FireStoreUtils.updateUser(Constant.userModel!);
@@ -279,20 +280,20 @@ class ProfileScreen extends StatelessWidget {
context: context,
builder: (BuildContext context) {
return CustomDialogBox(
title: "Delete Account".tr,
descriptions: "Are you sure you want to delete your account? This action is irreversible and will permanently remove all your data.".tr,
positiveString: "Delete".tr,
negativeString: "Cancel".tr,
title: "Delete Account".tr(),
descriptions: "Are you sure you want to delete your account? This action is irreversible and will permanently remove all your data.".tr(),
positiveString: "Delete".tr(),
negativeString: "Cancel".tr(),
positiveClick: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
await controller.deleteUserFromServer();
await FireStoreUtils.deleteUser().then((value) {
ShowToastDialog.closeLoader();
if (value == true) {
ShowToastDialog.showToast("Account deleted successfully".tr);
ShowToastDialog.showToast("Account deleted successfully".tr());
Get.offAll(const LoginScreen());
} else {
ShowToastDialog.showToast("Contact Administrator".tr);
ShowToastDialog.showToast("Contact Administrator".tr());
}
});
},
@@ -311,7 +312,7 @@ class ProfileScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_delete.svg"),
const SizedBox(width: 10),
Text(
"Delete Account".tr,
"Delete Account".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.danger300 : AppThemeData.danger300),
),
@@ -347,25 +348,25 @@ class ProfileScreen extends StatelessWidget {
},
child: Row(
children: [
SvgPicture.asset(image, colorFilter: title == "Log In".tr || title == "Cashbacks".tr ? const ColorFilter.mode(AppThemeData.success500, BlendMode.srcIn) : null, height: 24, width: 24),
SvgPicture.asset(image, colorFilter: title == "Log In".tr() || title == "Cashbacks".tr() ? const ColorFilter.mode(AppThemeData.success500, BlendMode.srcIn) : null, height: 24, width: 24),
const SizedBox(width: 10),
Expanded(
child: Text(
title.tr,
title.tr(),
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.medium,
fontSize: 16,
color:
title == "Log out".tr
title == "Log out".tr()
? AppThemeData.danger300
: title == "Log In".tr
: title == "Log In".tr()
? AppThemeData.success500
: (isDark ? AppThemeData.grey100 : AppThemeData.grey800),
),
),
),
title == "Dark Mode".tr
title == "Dark Mode".tr()
? Transform.scale(
scale: 0.8,
child: Obx(() => CupertinoSwitch(value: controller.isDarkModeSwitch.value, activeTrackColor: AppThemeData.primary300, onChanged: controller.toggleDarkMode)),

View File

@@ -6,6 +6,7 @@ import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.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_rating_bar/flutter_rating_bar.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -31,7 +32,7 @@ class RateProductScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Rate the item".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Rate the item".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body:
controller.isLoading.value
@@ -49,9 +50,9 @@ class RateProductScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Rate for".tr, style: TextStyle(color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.medium)),
Text("Rate for".tr(), style: TextStyle(color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.medium)),
Text(
"${controller.productModel.value.name}".tr,
"${controller.productModel.value.name}".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 18, fontFamily: AppThemeData.semiBold),
),
const SizedBox(height: 10),
@@ -123,14 +124,14 @@ class RateProductScreen extends StatelessWidget {
SvgPicture.asset('assets/icons/ic_folder.svg'),
const SizedBox(height: 10),
Text(
"Choose a image and upload here".tr,
"Choose a image and upload here".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.medium, fontSize: 16),
),
const SizedBox(height: 5),
Text("JPEG, PNG".tr, style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular)),
Text("JPEG, PNG".tr(), style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular)),
const SizedBox(height: 10),
RoundedButtonFill(
title: "Brows Image".tr,
title: "Brows Image".tr(),
color: AppThemeData.primary50,
width: 30,
height: 5,
@@ -216,7 +217,7 @@ class RateProductScreen extends StatelessWidget {
enabledBorder: InputBorder.none,
errorBorder: InputBorder.none,
border: InputBorder.none,
hintText: "Type comment".tr,
hintText: "Type comment".tr(),
hintStyle: TextStyle(fontSize: 14, color: isDark ? AppThemeData.grey600 : AppThemeData.grey400, fontFamily: AppThemeData.regular),
),
),
@@ -235,7 +236,7 @@ class RateProductScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "Submit Review".tr,
title: "Submit Review".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
@@ -265,7 +266,7 @@ class RateProductScreen extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.only(top: 15),
child: Text("Please Select".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.bold, fontSize: 16)),
child: Text("Please Select".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.bold, fontSize: 16)),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -277,7 +278,7 @@ class RateProductScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(onPressed: () => controller.pickFile(source: ImageSource.camera), icon: const Icon(Icons.camera_alt, size: 32)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Camera".tr)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Camera".tr())),
],
),
),
@@ -288,7 +289,7 @@ class RateProductScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(onPressed: () => controller.pickFile(source: ImageSource.gallery), icon: const Icon(Icons.photo_library_sharp, size: 32)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Gallery".tr)),
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Gallery".tr())),
],
),
),

View File

@@ -3,6 +3,7 @@ import 'package:customer/controllers/refer_friend_controller.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -51,17 +52,17 @@ class ReferFriendScreen extends StatelessWidget {
Center(child: SvgPicture.asset("assets/images/referal_top.svg")),
const SizedBox(height: 10),
Text(
"Refer your friend and earn".tr,
"Refer your friend and earn".tr(),
style: TextStyle(fontSize: 22, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
),
const SizedBox(width: 4),
Text(
"${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'Each🎉'.tr}",
"${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'Each🎉'.tr()}",
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
const SizedBox(height: 32),
Text(
"Invite Friends & Businesses".tr,
"Invite Friends & Businesses".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.ecommerce100 : AppThemeData.ecommerceDark100,
@@ -71,8 +72,8 @@ class ReferFriendScreen extends StatelessWidget {
),
const SizedBox(height: 8),
Text(
"${'Invite your friends to sign up with Foodie using your code, and youll earn'.tr} ${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'after their Success the first order! 💸🍔'.tr}"
.tr,
"${'Invite your friends to sign up with Foodie using your code, and youll earn'.tr()} ${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'after their Success the first order! 💸🍔'.tr()}"
.tr(),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
),
@@ -101,7 +102,7 @@ class ReferFriendScreen extends StatelessWidget {
InkWell(
onTap: () {
Clipboard.setData(ClipboardData(text: controller.referralModel.value.referralCode.toString()));
ShowToastDialog.showToast("Copied".tr);
ShowToastDialog.showToast("Copied".tr());
},
child: const Icon(Icons.copy, color: AppThemeData.ecommerce100),
),
@@ -117,7 +118,7 @@ class ReferFriendScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30),
child: Text(
"or".tr,
"or".tr(),
textAlign: TextAlign.center,
style: TextStyle(
color: isDark ? AppThemeData.ecommerce100 : AppThemeData.ecommerceDark100,
@@ -132,13 +133,13 @@ class ReferFriendScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: "Share Code".tr,
title: "Share Code".tr(),
width: 55,
color: AppThemeData.ecommerce300,
textColor: AppThemeData.grey50,
onPress: () async {
await Share.share(
"${"Hey there, thanks for choosing Foodie. Hope you love our product. If you do, share it with your friends using code".tr} ${controller.referralModel.value.referralCode.toString()} ${"and get".tr}${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount.toString())} ${"when order completed".tr}",
"${"Hey there, thanks for choosing Foodie. Hope you love our product. If you do, share it with your friends using code".tr()} ${controller.referralModel.value.referralCode.toString()} ${"and get".tr()}${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount.toString())} ${"when order completed".tr()}",
);
},
),

View File

@@ -13,6 +13,7 @@ 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/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
@@ -51,8 +52,8 @@ class RestaurantDetailsScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('${cartItem.length} ${"items".tr}', style: TextStyle(fontFamily: AppThemeData.medium, color: AppThemeData.grey50, fontSize: 16)),
Text('View Cart'.tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: AppThemeData.grey50, fontSize: 16, fontWeight: FontWeight.bold)),
Text('${cartItem.length} ${"items".tr()}', style: TextStyle(fontFamily: AppThemeData.medium, color: AppThemeData.grey50, fontSize: 16)),
Text('View Cart'.tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: AppThemeData.grey50, fontSize: 16, fontWeight: FontWeight.bold)),
],
),
),
@@ -89,7 +90,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
children: [
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
const SizedBox(width: 5),
Text("Free Delivery".tr, style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600)),
Text("Free Delivery".tr(), style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600)),
],
),
),
@@ -288,7 +289,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
Get.to(const ReviewListScreen(), arguments: {"vendorModel": controller.vendorModel.value});
},
child: Text(
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr}",
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr()}",
style: TextStyle(decoration: TextDecoration.underline, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular),
),
),
@@ -301,7 +302,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
: Row(
children: [
Text(
controller.isOpen.value ? "Open".tr : "Close".tr,
controller.isOpen.value ? "Open".tr() : "Close".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -316,13 +317,13 @@ class RestaurantDetailsScreen extends StatelessWidget {
InkWell(
onTap: () {
if (controller.vendorModel.value.workingHours!.isEmpty) {
ShowToastDialog.showToast("Timing is not added by store".tr);
ShowToastDialog.showToast("Timing is not added by store".tr());
} else {
timeShowBottomSheet(context, controller);
}
},
child: Text(
"View Timings".tr,
"View Timings".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -344,7 +345,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 20),
Text(
"Also applicable on table booking".tr,
"Also applicable on table booking".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -383,7 +384,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Table Booking".tr,
"Table Booking".tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
@@ -392,7 +393,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
),
),
Text(
"Quick Conformations".tr,
"Quick Conformations".tr(),
style: TextStyle(
fontSize: 12,
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
@@ -418,7 +419,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 20),
Text(
"Additional Offers".tr,
"Additional Offers".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -435,7 +436,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
),
const SizedBox(height: 20),
Text(
"Menu".tr,
"Menu".tr(),
textAlign: TextAlign.start,
maxLines: 1,
style: TextStyle(
@@ -449,7 +450,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
const SizedBox(height: 10),
TextFieldWidget(
controller: controller.searchEditingController.value,
hintText: 'Search the item and more...'.tr,
hintText: 'Search the item and more...'.tr(),
onchange: (value) {
controller.searchProduct(value);
},
@@ -492,7 +493,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_veg.svg", height: 20, width: 20),
const SizedBox(width: 8),
Text(
'Veg'.tr,
'Veg'.tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
],
@@ -532,7 +533,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_nonveg.svg", height: 20, width: 20),
const SizedBox(width: 8),
Text(
'Non Veg'.tr,
'Non Veg'.tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
],
@@ -805,7 +806,7 @@ class CouponListView extends StatelessWidget {
InkWell(
onTap: () {
Clipboard.setData(ClipboardData(text: offerModel.code.toString())).then((value) {
ShowToastDialog.showToast("Copied".tr);
ShowToastDialog.showToast("Copied".tr());
});
},
child: Row(
@@ -921,7 +922,7 @@ class ProductListView extends StatelessWidget {
productModel.nonveg == true ? SvgPicture.asset("assets/icons/ic_nonveg.svg") : SvgPicture.asset("assets/icons/ic_veg.svg"),
const SizedBox(width: 5),
Text(
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
style: TextStyle(
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
fontFamily: AppThemeData.semiBold,
@@ -995,7 +996,7 @@ class ProductListView extends StatelessWidget {
Icon(Icons.info, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, size: 18),
const SizedBox(width: 8),
Text(
"Info".tr,
"Info".tr(),
maxLines: 2,
style: TextStyle(
overflow: TextOverflow.ellipsis,
@@ -1064,7 +1065,7 @@ class ProductListView extends StatelessWidget {
child:
selectedVariants.isNotEmpty || (productModel.addOnsTitle != null && productModel.addOnsTitle!.isNotEmpty)
? RoundedButtonFill(
title: "Add".tr,
title: "Add".tr(),
width: 10,
height: 4,
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
@@ -1177,7 +1178,7 @@ class ProductListView extends StatelessWidget {
quantity: cartItem.where((p0) => p0.id == productModel.id).first.quantity! + 1,
);
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
},
child: Icon(Icons.add, color: isDark ? AppThemeData.grey50 : AppThemeData.greyDark50),
@@ -1186,7 +1187,7 @@ class ProductListView extends StatelessWidget {
),
)
: RoundedButtonFill(
title: "Add".tr,
title: "Add".tr(),
width: 10,
height: 4,
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
@@ -1195,7 +1196,7 @@ class ProductListView extends StatelessWidget {
if (1 <= (productModel.quantity ?? 0) || (productModel.quantity ?? 0) == -1) {
controller.addToCart(productModel: productModel, price: price, discountPrice: disPrice, isIncrement: true, quantity: 1);
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
},
),
@@ -1257,7 +1258,7 @@ class ProductListView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Product Information's".tr,
"Product Information's".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.bold, fontWeight: FontWeight.w700, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -1278,7 +1279,7 @@ class ProductListView extends StatelessWidget {
children: [
Expanded(
child: Text(
"Gram".tr,
"Gram".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -1300,7 +1301,7 @@ class ProductListView extends StatelessWidget {
children: [
Expanded(
child: Text(
"Calories".tr,
"Calories".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -1322,7 +1323,7 @@ class ProductListView extends StatelessWidget {
children: [
Expanded(
child: Text(
"Proteins".tr,
"Proteins".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -1344,7 +1345,7 @@ class ProductListView extends StatelessWidget {
children: [
Expanded(
child: Text(
"Fats".tr,
"Fats".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
),
@@ -1365,7 +1366,7 @@ class ProductListView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Specification".tr,
"Specification".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w700, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -1408,7 +1409,7 @@ class ProductListView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Brand".tr,
"Brand".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontWeight: FontWeight.w700, fontFamily: AppThemeData.bold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
),
@@ -1424,7 +1425,7 @@ class ProductListView extends StatelessWidget {
: const SizedBox(),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Back".tr,
title: "Back".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
@@ -1588,7 +1589,7 @@ class ProductDetailsView extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Required • Select any 1 option".tr,
"Required • Select any 1 option".tr(),
style: TextStyle(
fontSize: 12,
overflow: TextOverflow.ellipsis,
@@ -1700,7 +1701,7 @@ class ProductDetailsView extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Text(
"Addons".tr,
"Addons".tr(),
style: TextStyle(
fontSize: 16,
overflow: TextOverflow.ellipsis,
@@ -1830,7 +1831,7 @@ class ProductDetailsView extends StatelessWidget {
controller.quantity.value += 1;
controller.update();
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
} else {
int totalQuantity = int.parse(
@@ -1840,7 +1841,7 @@ class ProductDetailsView extends StatelessWidget {
controller.quantity.value += 1;
controller.update();
} else {
ShowToastDialog.showToast("Out of stock".tr);
ShowToastDialog.showToast("Out of stock".tr());
}
}
},
@@ -1854,7 +1855,7 @@ class ProductDetailsView extends StatelessWidget {
Expanded(
flex: 2,
child: RoundedButtonFill(
title: "${'Add item'.tr} ${Constant.amountShow(amount: controller.calculatePrice(productModel))}".tr,
title: "${'Add item'.tr()} ${Constant.amountShow(amount: controller.calculatePrice(productModel))}".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,

View File

@@ -6,6 +6,7 @@ import 'package:customer/models/rating_model.dart';
import 'package:customer/models/review_attribute_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_rating_bar/flutter_rating_bar.dart';
import '../../../controllers/theme_controller.dart';
import 'package:customer/utils/network_image_widget.dart';
@@ -31,13 +32,13 @@ class ReviewListScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Reviews".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Reviews".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body:
controller.isLoading.value
? Constant.loader()
: controller.ratingList.isEmpty
? Constant.showEmptyView(message: "No Review found".tr)
? Constant.showEmptyView(message: "No Review found".tr())
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: ListView.builder(
@@ -72,7 +73,7 @@ class ReviewListScreen extends StatelessWidget {
} else if (snapshot.data != null) {
ProductModel model = ProductModel.fromJson(snapshot.data!.data()!);
return Text(
'${'Rate for'.tr} - ${model.name ?? ''}',
'${'Rate for'.tr()} - ${model.name ?? ''}',
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.semiBold),
);
} else {

View File

@@ -1,6 +1,7 @@
import 'package:customer/controllers/scan_qr_code_controller.dart';
import 'package:customer/models/vendor_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:qr_code_dart_scan/qr_code_dart_scan.dart';
@@ -24,7 +25,7 @@ class ScanQrCodeScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
title: Text("Scan QR Code".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
title: Text("Scan QR Code".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
),
body: QRCodeDartScanView(
// enable scan invert qr code ( default = false)
@@ -32,11 +33,11 @@ class ScanQrCodeScreen extends StatelessWidget {
// if TypeScan.takePicture will try decode when click to take a picture(default TypeScan.live)
onCapture: (Result result) {
Get.back();
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
if (controller.allNearestRestaurant.isNotEmpty) {
if (controller.allNearestRestaurant.where((vendor) => vendor.id == result.text).isEmpty) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Store is not available".tr);
ShowToastDialog.showToast("Store is not available".tr());
return;
}
VendorModel storeModel = controller.allNearestRestaurant.firstWhere((vendor) => vendor.id == result.text);
@@ -45,7 +46,7 @@ class ScanQrCodeScreen extends StatelessWidget {
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": storeModel});
} else {
Get.back();
ShowToastDialog.showToast("Store is not available".tr);
ShowToastDialog.showToast("Store is not available".tr());
}
},
),

View File

@@ -5,6 +5,7 @@ import 'package:customer/models/vendor_model.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/text_field_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import '../../../controllers/theme_controller.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/material.dart';
@@ -31,7 +32,7 @@ class SearchScreen extends StatelessWidget {
centerTitle: false,
titleSpacing: 0,
title: Text(
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? "Find your favorite products and nearby stores" : "Search Item & Store".tr,
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? "Find your favorite products and nearby stores" : "Search Item & Store".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -40,7 +41,7 @@ class SearchScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextFieldWidget(
hintText: Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? 'Find your favorite products and nearby stores'.tr : 'Search the store and item'.tr,
hintText: Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? 'Find your favorite products and nearby stores'.tr() : 'Search the store and item'.tr(),
prefix: Padding(padding: const EdgeInsets.symmetric(horizontal: 16), child: SvgPicture.asset("assets/icons/ic_search.svg")),
controller: null,
onchange: (value) {
@@ -65,7 +66,7 @@ class SearchScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Store".tr,
"Store".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -131,7 +132,7 @@ class SearchScreen extends StatelessWidget {
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
const SizedBox(width: 5),
Text(
"Free Delivery".tr,
"Free Delivery".tr(),
style: TextStyle(fontSize: 14, color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
),
],
@@ -236,7 +237,7 @@ class SearchScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Items".tr,
"Items".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -290,7 +291,7 @@ class SearchScreen extends StatelessWidget {
productModel.nonveg == true ? SvgPicture.asset("assets/icons/ic_nonveg.svg") : SvgPicture.asset("assets/icons/ic_veg.svg"),
const SizedBox(width: 5),
Text(
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
style: TextStyle(
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
fontFamily: AppThemeData.semiBold,

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_html/flutter_html.dart';
@@ -28,7 +29,7 @@ class TermsAndConditionScreen extends StatelessWidget {
child: Icon(Icons.chevron_left_outlined, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
title: Text(
type == "privacy" ? "Privacy Policy".tr : "Terms & Conditions".tr,
type == "privacy" ? "Privacy Policy".tr() : "Terms & Conditions".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.bold, fontSize: 18),
),
elevation: 0,

View File

@@ -6,6 +6,7 @@ import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_scr
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/text_field_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
@@ -27,7 +28,7 @@ class PaymentListScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Top up Wallet".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
title: Text("Top up Wallet".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
),
body: SingleChildScrollView(
child: Column(
@@ -36,8 +37,8 @@ class PaymentListScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextFieldWidget(
title: 'Amount'.tr,
hintText: 'Enter Amount'.tr,
title: 'Amount'.tr(),
hintText: 'Enter Amount'.tr(),
controller: controller.topUpAmountController.value,
textInputType: const TextInputType.numberWithOptions(decimal: true, signed: true),
prefix: Padding(padding: const EdgeInsets.all(12.0), child: Text(Constant.currencyModel!.symbol.toString(), style: const TextStyle(fontSize: 20, color: AppThemeData.grey800))),
@@ -47,7 +48,7 @@ class PaymentListScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(
"Select Top up Options".tr,
"Select Top up Options".tr(),
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
),
@@ -86,14 +87,14 @@ class PaymentListScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: RoundedButtonFill(
title: "Top-up".tr,
title: "Top-up".tr(),
height: 5.5,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
fontSizes: 16,
onPress: () async {
if (controller.topUpAmountController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Amount".tr);
ShowToastDialog.showToast("Please Enter Amount".tr());
} else {
if (double.parse(controller.topUpAmountController.value.text) >= double.parse(Constant.minimumAmountToDeposit.toString())) {
if (controller.selectedPaymentMethod.value == PaymentGateway.stripe.name) {
@@ -118,17 +119,17 @@ class PaymentListScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse(controller.topUpAmountController.value.text), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.topUpAmountController.value.text, orderId: result.id);
}
});
} else {
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
} else {
ShowToastDialog.showToast("${'Please Enter minimum amount of'.tr} ${Constant.amountShow(amount: Constant.minimumAmountToDeposit)}");
ShowToastDialog.showToast("${'Please Enter minimum amount of'.tr()} ${Constant.amountShow(amount: Constant.minimumAmountToDeposit)}");
}
}
},

View File

@@ -4,6 +4,7 @@ import 'package:customer/models/wallet_transaction_model.dart';
import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/payment_list_screen.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import '../../../constant/collection_name.dart';
import '../../../controllers/theme_controller.dart';
import '../../../models/cab_order_model.dart';
@@ -48,16 +49,16 @@ class WalletScreen extends StatelessWidget {
children: [
Image.asset("assets/images/login.gif", height: 120),
const SizedBox(height: 12),
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -86,11 +87,11 @@ class WalletScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"My Wallet".tr,
"My Wallet".tr(),
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
),
Text(
"Keep track of your balance, transactions, and payment methods all in one place.".tr,
"Keep track of your balance, transactions, and payment methods all in one place.".tr(),
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
),
],
@@ -112,7 +113,7 @@ class WalletScreen extends StatelessWidget {
child: Column(
children: [
Text(
"My Wallet".tr,
"My Wallet".tr(),
maxLines: 1,
style: TextStyle(
color: isDark ? AppThemeData.primary100 : AppThemeData.primary100,
@@ -130,7 +131,7 @@ class WalletScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 80),
child: RoundedButtonFill(
title: "Top up".tr,
title: "Top up".tr(),
color: AppThemeData.warning300,
textColor: AppThemeData.grey900,
onPress: () {
@@ -148,7 +149,7 @@ class WalletScreen extends StatelessWidget {
Expanded(
child:
controller.walletTransactionList.isEmpty
? Constant.showEmptyView(message: "Transaction not found".tr)
? Constant.showEmptyView(message: "Transaction not found".tr())
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: ListView.builder(
@@ -197,7 +198,7 @@ class WalletScreen extends StatelessWidget {
Get.to(const OrderDetailsScreen(), arguments: {"orderModel": OrderModel.fromJson(orderData)});
break;
default:
ShowToastDialog.showToast("Order details not available".tr);
ShowToastDialog.showToast("Order details not available".tr());
}
}
},

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/assets.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/on_boarding_controller.dart';
@@ -65,7 +66,7 @@ class OnboardingScreen extends StatelessWidget {
const SizedBox(height: 20),
controller.currentPage.value == pageCount - 1
? RoundedButtonFill(
title: "Lets Get Started".tr,
title: "Lets Get Started".tr(),
onPress: () {
_finish();
},
@@ -73,11 +74,11 @@ class OnboardingScreen extends StatelessWidget {
)
: Row(
children: [
Expanded(child: RoundedButtonFill(title: "Skip".tr, onPress: () => _finish(), color: AppThemeData.grey50, textColor: AppThemeData.grey900)),
Expanded(child: RoundedButtonFill(title: "Skip".tr(), onPress: () => _finish(), color: AppThemeData.grey50, textColor: AppThemeData.grey900)),
const SizedBox(width: 20),
Expanded(
child: RoundedButtonFill(
title: "Next".tr,
title: "Next".tr(),
onPress: () {
controller.nextPage();
},

View File

@@ -9,6 +9,7 @@ import 'package:customer/screen_ui/on_demand_service/on_demand_details_screen.da
import 'package:customer/service/fire_store_utils.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -32,7 +33,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
child: Row(
children: [
const SizedBox(width: 10),
Text("Favourite Services".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey900 : AppThemeData.grey900, fontSize: 20)),
Text("Favourite Services".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey900 : AppThemeData.grey900, fontSize: 20)),
],
),
),
@@ -49,16 +50,16 @@ class FavouriteOndemandScreen extends StatelessWidget {
children: [
Image.asset("assets/images/login.gif", height: 120),
const SizedBox(height: 12),
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -74,7 +75,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child:
controller.lstFav.isEmpty
? Constant.showEmptyView(message: "Favourite Service not found.".tr)
? Constant.showEmptyView(message: "Favourite Service not found.".tr())
: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.zero,
@@ -271,19 +272,19 @@ class FavouriteOndemandScreen extends StatelessWidget {
Widget _buildPrice(ProviderServiceModel provider, {bool isDark = false}) {
if (provider.disPrice == "" || provider.disPrice == "0") {
return Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
);
} else {
return Row(
children: [
Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
),
const SizedBox(width: 5),
Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
style: const TextStyle(fontSize: 12, color: Colors.grey, decoration: TextDecoration.lineThrough),
),
],

View File

@@ -1,4 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
@@ -29,7 +30,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
automaticallyImplyLeading: false,
backgroundColor: AppThemeData.primary300,
centerTitle: false,
title: Padding(padding: const EdgeInsets.only(bottom: 10), child: Text("Booking History".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))),
title: Padding(padding: const EdgeInsets.only(bottom: 10), child: Text("Booking History".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(48),
child: TabBar(
@@ -54,7 +55,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
final orders = controller.getOrdersForTab(title);
if (orders.isEmpty) {
return Center(child: Text("No ride found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
return Center(child: Text("No ride found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
}
return ListView.builder(
@@ -124,7 +125,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
onProviderOrder.otp != null &&
onProviderOrder.otp!.isNotEmpty)
Text(
"${'OTP :'.tr} ${onProviderOrder.otp}",
"${'OTP :'.tr()} ${onProviderOrder.otp}",
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
],
@@ -155,7 +156,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
final price = hasDiscount ? order.provider.disPrice.toString() : order.provider.price.toString();
return Text(
order.provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: price) : "${Constant.amountShow(amount: price)}/${'hr'.tr}",
order.provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: price) : "${Constant.amountShow(amount: price)}/${'hr'.tr()}",
style: AppThemeData.mediumTextStyle(fontSize: 16, color: AppThemeData.primary300),
);
}
@@ -194,8 +195,8 @@ class MyBookingOnDemandScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(label.tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(value.tr, style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(label.tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(value.tr(), style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
],
),
);

View File

@@ -1,5 +1,6 @@
import 'package:bottom_picker/bottom_picker.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
@@ -46,7 +47,7 @@ class OnDemandBookingScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Book Service".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Book Service".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -57,7 +58,7 @@ class OnDemandBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Services Section
Text("Services".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Services".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
const SizedBox(height: 10),
Container(
decoration: BoxDecoration(
@@ -118,7 +119,7 @@ class OnDemandBookingScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Address".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Address".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
SizedBox(height: 5),
InkWell(
onTap: () async {
@@ -130,14 +131,14 @@ class OnDemandBookingScreen extends StatelessWidget {
controller.selectedAddress.value = shippingAddress;
controller.calculatePrice();
} else {
ShowToastDialog.showToast("Service not available in this area".tr);
ShowToastDialog.showToast("Service not available in this area".tr());
}
}
});
} else {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
ShippingAddress shippingAddress = ShippingAddress();
@@ -205,7 +206,7 @@ class OnDemandBookingScreen extends StatelessWidget {
),
),
const SizedBox(height: 15),
TextFieldWidget(title: "Description".tr, hintText: "Enter Description".tr, controller: controller.descriptionController.value, maxLine: 5),
TextFieldWidget(title: "Description".tr(), hintText: "Enter Description".tr(), controller: controller.descriptionController.value, maxLine: 5),
const SizedBox(height: 10),
GestureDetector(
onTap: () {
@@ -225,7 +226,7 @@ class OnDemandBookingScreen extends StatelessWidget {
closeIconColor: isDark ? Colors.white : Colors.black,
).show(context);
},
child: TextFieldWidget(title: "Booking Date & Slot".tr, hintText: "Choose Date and Time".tr, controller: controller.dateTimeController.value, enable: false),
child: TextFieldWidget(title: "Booking Date & Slot".tr(), hintText: "Choose Date and Time".tr(), controller: controller.dateTimeController.value, enable: false),
),
const SizedBox(height: 15),
controller.provider.value?.priceUnit == "Fixed"
@@ -248,7 +249,7 @@ class OnDemandBookingScreen extends StatelessWidget {
buildPromoCode(controller, isDark),
Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
priceTotalRow(controller, isDark),
],
@@ -259,7 +260,7 @@ class OnDemandBookingScreen extends StatelessWidget {
),
bottomNavigationBar: Padding(
padding: const EdgeInsets.all(20.0),
child: RoundedButtonFill(title: "Confirm".tr, color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.confirmBooking(context)),
child: RoundedButtonFill(title: "Confirm".tr(), color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.confirmBooking(context)),
),
);
},
@@ -288,7 +289,7 @@ class OnDemandBookingScreen extends StatelessWidget {
Container(
margin: const EdgeInsets.only(top: 3),
child: Text(
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}" : "${coupon.discount} ${'% Off'.tr}",
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}" : "${coupon.discount} ${'% Off'.tr()}",
style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 0.7, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
@@ -301,7 +302,7 @@ class OnDemandBookingScreen extends StatelessWidget {
Text(coupon.code ?? '', style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, letterSpacing: 0.5, color: Colors.orange)),
Container(margin: const EdgeInsets.only(left: 15, right: 15, top: 3), width: 1, color: AppThemeData.grey50),
Text(
"valid till ".tr + controller.getDate(coupon.expiresAt!.toDate().toString()),
"valid till ".tr() + controller.getDate(coupon.expiresAt!.toDate().toString()),
style: TextStyle(letterSpacing: 0.5, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
],
@@ -337,10 +338,10 @@ class OnDemandBookingScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Promo Code".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
Text("Promo Code".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
const SizedBox(height: 5),
Text(
"Apply promo code".tr,
"Apply promo code".tr(),
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
overflow: TextOverflow.ellipsis,
),
@@ -402,12 +403,12 @@ class OnDemandBookingScreen extends StatelessWidget {
Container(padding: const EdgeInsets.only(top: 30), child: const Image(image: AssetImage('assets/images/redeem_coupon.png'), width: 100)),
Container(
padding: const EdgeInsets.only(top: 20),
child: Text('Redeem Your Coupons'.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
child: Text('Redeem Your Coupons'.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
),
Center(
child: Container(
padding: const EdgeInsets.only(top: 10, left: 22, right: 22),
child: Text("Voucher or Coupon code".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Voucher or Coupon code".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
),
Container(
@@ -426,7 +427,7 @@ class OnDemandBookingScreen extends StatelessWidget {
controller: controller.couponTextController.value,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Write Coupon Code".tr,
hintText: "Write Coupon Code".tr(),
hintStyle: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400),
),
),
@@ -437,7 +438,7 @@ class OnDemandBookingScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 30, bottom: 30, left: 15, right: 15),
child: RoundedButtonFill(
title: "REDEEM NOW".tr,
title: "REDEEM NOW".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () {
@@ -449,7 +450,7 @@ class OnDemandBookingScreen extends StatelessWidget {
controller.applyCoupon(matchingCoupon);
Get.back();
} else {
ShowToastDialog.showToast("Applied coupon not valid.".tr);
ShowToastDialog.showToast("Applied coupon not valid.".tr());
}
},
),
@@ -475,7 +476,7 @@ class OnDemandBookingScreen extends StatelessWidget {
child: Column(
children: [
const SizedBox(height: 5),
rowText("Price".tr, Constant.amountShow(amount: controller.price.value.toString()), isDark),
rowText("Price".tr(), Constant.amountShow(amount: controller.price.value.toString()), isDark),
controller.discountAmount.value != 0 ? const Divider() : const SizedBox(),
controller.discountAmount.value != 0
? Padding(
@@ -488,7 +489,7 @@ class OnDemandBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${"Discount".tr} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
"${"Discount".tr()} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
Text(controller.offerCode.value, style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
@@ -501,7 +502,7 @@ class OnDemandBookingScreen extends StatelessWidget {
)
: const SizedBox(),
const Divider(),
rowText("SubTotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
rowText("SubTotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
const Divider(),
ListView.builder(
itemCount: Constant.taxList.length,
@@ -534,7 +535,7 @@ class OnDemandBookingScreen extends StatelessWidget {
);
},
),
rowText("Total Amount".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
rowText("Total Amount".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
const SizedBox(height: 5),
],
),
@@ -548,8 +549,8 @@ class OnDemandBookingScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(value.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(title.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(value.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
],
),
);

View File

@@ -1,5 +1,6 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/screen_ui/on_demand_service/view_category_service_screen.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/constant.dart';
@@ -41,9 +42,9 @@ class OnDemandCategoryScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Explore services".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Explore services".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text(
"Explore services tailored for you—quick, easy, and personalized.".tr,
"Explore services tailored for you—quick, easy, and personalized.".tr(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900),
@@ -64,7 +65,7 @@ class OnDemandCategoryScreen extends StatelessWidget {
child: Column(
children: [
controller.categories.isEmpty
? Center(child: Text("No Categories".tr))
? Center(child: Text("No Categories".tr()))
: GridView.builder(
padding: const EdgeInsets.all(5),
itemCount: controller.categories.length,

View File

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/cab_dashboard_controller.dart';
import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -41,18 +42,18 @@ class OnDemandDashboardScreen extends StatelessWidget {
items:
Constant.walletSetting == false
? [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
]
: [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr, controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr(), controller: controller),
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
],
),
);

View File

@@ -1,6 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/constant/constant.dart';
import 'package:customer/screen_ui/on_demand_service/provider_screen.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
@@ -35,7 +36,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
RoundedButtonFill(
title: "Book Now".tr,
title: "Book Now".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
@@ -81,7 +82,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
child: Container(
decoration: BoxDecoration(borderRadius: BorderRadius.circular(40), color: controller.isOpen.value ? Colors.green : Colors.red),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Text(controller.isOpen.value ? "Open".tr : "Close".tr, style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontSize: 14)),
child: Text(controller.isOpen.value ? "Open".tr() : "Close".tr(), style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontSize: 14)),
),
),
],
@@ -111,19 +112,19 @@ class OnDemandDetailsScreen extends StatelessWidget {
children: [
provider.disPrice == "" || provider.disPrice == "0"
? Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
style: TextStyle(fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
)
: Row(
children: [
Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr()}',
style: TextStyle(fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.grey, decoration: TextDecoration.lineThrough),
),
),
@@ -153,7 +154,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
),
const SizedBox(width: 10),
Text(
"(${provider.reviewsCount} ${'Reviews'.tr})",
"(${provider.reviewsCount} ${'Reviews'.tr()})",
style: TextStyle(letterSpacing: 0.5, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500, color: isDark ? Colors.white : Colors.black),
),
],
@@ -190,7 +191,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
builder: (context) => showTiming(context, controller, isDark),
);
},
child: Text("View Timing".tr, style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.green, letterSpacing: 0.5)),
child: Text("View Timing".tr(), style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.green, letterSpacing: 0.5)),
),
),
),
@@ -253,7 +254,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
margin: const EdgeInsets.only(right: 10),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
decoration: BoxDecoration(color: controller.tabString.value == title ? AppThemeData.primary300 : Colors.grey.shade200, borderRadius: BorderRadius.circular(10)),
child: Text(title.tr, style: TextStyle(fontWeight: FontWeight.bold, color: controller.tabString.value == title ? Colors.white : Colors.black)),
child: Text(title.tr(), style: TextStyle(fontWeight: FontWeight.bold, color: controller.tabString.value == title ? Colors.white : Colors.black)),
),
);
}
@@ -264,7 +265,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text((providerModel.description ?? '').tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
Text((providerModel.description ?? '').tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
const SizedBox(height: 10),
Obx(() {
final user = controller.userModel.value;
@@ -339,7 +340,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
final photos = controller.provider.photos;
if (photos.isEmpty) {
return Center(child: Text("No Image Found".tr));
return Center(child: Text("No Image Found".tr()));
}
return GridView.builder(
@@ -373,7 +374,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
final reviews = controller.ratingService;
if (reviews.isEmpty) {
return SizedBox(height: 200, child: Center(child: Text("No review Found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))));
return SizedBox(height: 200, child: Center(child: Text("No review Found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))));
}
return ListView.builder(
@@ -439,21 +440,21 @@ class OnDemandDetailsScreen extends StatelessWidget {
children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
child: Text("Service Timing".tr, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
child: Text("Service Timing".tr(), style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
child: Row(
children: [
Expanded(child: _timeCard(context, "Start Time : ".tr, provider.startTime.toString(), isDark)),
Expanded(child: _timeCard(context, "Start Time : ".tr(), provider.startTime.toString(), isDark)),
const SizedBox(width: 10),
Expanded(child: _timeCard(context, "End Time : ".tr, provider.endTime.toString(), isDark)),
Expanded(child: _timeCard(context, "End Time : ".tr(), provider.endTime.toString(), isDark)),
],
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
child: Text("Service Days".tr, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
child: Text("Service Days".tr(), style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),

View File

@@ -15,6 +15,7 @@ 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:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:geocoding/geocoding.dart';
@@ -60,7 +61,7 @@ class OnDemandHomeScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Constant.userModel == null
? InkWell(onTap: () => Get.offAll(const LoginScreen()), child: Text("Login".tr, style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)))
? InkWell(onTap: () => Get.offAll(const LoginScreen()), child: Text("Login".tr(), style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)))
: Text(Constant.userModel!.fullName(), style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)),
InkWell(
onTap: () async {
@@ -75,7 +76,7 @@ class OnDemandHomeScreen extends StatelessWidget {
} else {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
// ✅ declare it once here!
ShippingAddress shippingAddress = ShippingAddress();
@@ -165,16 +166,16 @@ class OnDemandHomeScreen extends StatelessWidget {
children: [
Image.asset("assets/images/location.gif", height: 120),
const SizedBox(height: 12),
Text("No Store Found in Your Area".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("No Store Found in Your Area".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr,
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Change Zone".tr,
title: "Change Zone".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -203,7 +204,7 @@ class OnDemandHomeScreen extends StatelessWidget {
),
child:
controller.categories.isEmpty
? Constant.showEmptyView(message: "No Categories".tr)
? Constant.showEmptyView(message: "No Categories".tr())
: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Row(
@@ -240,7 +241,7 @@ class OnDemandHomeScreen extends StatelessWidget {
width: 70,
child: Center(
child: Text(
"View All".tr,
"View All".tr(),
textAlign: TextAlign.center,
maxLines: 1,
style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -260,7 +261,7 @@ class OnDemandHomeScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Most Popular services".tr,
"Most Popular services".tr(),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600),
),
),
@@ -268,13 +269,13 @@ class OnDemandHomeScreen extends StatelessWidget {
onTap: () {
Get.to(() => ViewAllPopularServiceScreen());
},
child: Text("View all".tr, style: TextStyle(color: AppThemeData.primary300, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600)),
child: Text("View all".tr(), style: TextStyle(color: AppThemeData.primary300, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600)),
),
],
),
),
controller.providerList.isEmpty
? Center(child: Text("No Services Found".tr))
? Center(child: Text("No Services Found".tr()))
: ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.zero,
@@ -492,14 +493,14 @@ class ServiceView extends StatelessWidget {
Widget _buildPrice() {
if (provider.disPrice == "" || provider.disPrice == "0") {
return Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
);
} else {
return Row(
children: [
Text(
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
),
const SizedBox(width: 6),

View File

@@ -1,5 +1,6 @@
import 'package:clipboard/clipboard.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
@@ -42,7 +43,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Order Details".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Order Details".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -68,7 +69,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Cancel Reason'.tr, style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text('Cancel Reason'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(controller.onProviderOrder.value?.reason ?? '', style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.danger300)),
],
),
@@ -89,13 +90,13 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Booking ID'.tr, style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text('Booking ID'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
InkWell(
onTap: () {
FlutterClipboard.copy(controller.onProviderOrder.value?.id ?? '').then((value) {
SnackBar snackBar = SnackBar(
content: Text(
"Booking ID Copied".tr,
"Booking ID Copied".tr(),
textAlign: TextAlign.center,
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -110,7 +111,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
),
SizedBox(height: 10),
Text(
"${'Booking Address :'.tr} ${controller.onProviderOrder.value?.address?.getFullAddress()}",
"${'Booking Address :'.tr()} ${controller.onProviderOrder.value?.address?.getFullAddress()}",
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
],
@@ -159,7 +160,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.only(top: 6),
child: Text('${'Date:'.tr} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text('${'Date:'.tr()} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
Padding(
padding: const EdgeInsets.only(top: 6),
@@ -176,7 +177,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Padding(
padding: const EdgeInsets.only(top: 6),
child: Text('${'Time:'.tr} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text('${'Time:'.tr()} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
Padding(
padding: const EdgeInsets.only(top: 6),
@@ -205,7 +206,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: Text('About Worker'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text('About Worker'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
Container(
decoration: BoxDecoration(
@@ -302,7 +303,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
},
style: ElevatedButton.styleFrom(backgroundColor: Colors.orange, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
child: Text('Add Review'.tr, style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text('Add Review'.tr(), style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
),
),
@@ -327,7 +328,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Icon(Icons.call, color: AppThemeData.grey50),
SizedBox(width: 10),
Text('Call'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
Text('Call'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
],
),
),
@@ -336,7 +337,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Expanded(
child: ElevatedButton(
onPressed: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
ShowToastDialog.closeLoader();
Get.to(
@@ -361,7 +362,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Icon(Icons.chat_bubble, color: AppThemeData.grey50),
SizedBox(width: 10),
Text('Chat'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
Text('Chat'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
],
),
),
@@ -379,7 +380,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
: SizedBox(),
Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: Text("About provider".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("About provider".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
Container(
decoration: BoxDecoration(
@@ -458,7 +459,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
}
},
style: ElevatedButton.styleFrom(backgroundColor: Colors.orange, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
child: Text('Add Review'.tr, style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text('Add Review'.tr(), style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
),
),
@@ -483,7 +484,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Icon(Icons.call, color: AppThemeData.grey50),
SizedBox(width: 10),
Text('Call'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
Text('Call'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
],
),
),
@@ -498,7 +499,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Expanded(
child: ElevatedButton(
onPressed: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
ShowToastDialog.closeLoader();
@@ -524,7 +525,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Icon(Icons.chat_bubble, color: AppThemeData.grey50),
SizedBox(width: 10),
Text('Chat'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
Text('Chat'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
],
),
),
@@ -544,7 +545,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
priceTotalRow(controller, isDark),
],
@@ -574,7 +575,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
: Offstage(),
Padding(
padding: EdgeInsets.symmetric(vertical: 16),
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
priceTotalRow(controller, isDark),
],
@@ -594,7 +595,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Total Extra Charges : ".tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
Text("Total Extra Charges : ".tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
Text(
Constant.amountShow(amount: controller.onProviderOrder.value?.extraCharges.toString()),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
@@ -607,7 +608,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Extra charge Notes : ".tr,
"Extra charge Notes : ".tr(),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
),
),
@@ -640,7 +641,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
controller.onProviderOrder.value?.newScheduleDateTime != null
? Row(
children: [
Text("New Date : ".tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
Text("New Date : ".tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
Text(
DateFormat('dd-MMM-yyyy hh:mm a').format(controller.onProviderOrder.value!.newScheduleDateTime!.toDate()),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
@@ -652,7 +653,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
? Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: RoundedButtonFill(
title: "Cancel Booking".tr,
title: "Cancel Booking".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () {
@@ -672,7 +673,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
? Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: RoundedButtonFill(
title: 'Pay Extra Amount'.tr,
title: 'Pay Extra Amount'.tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
@@ -689,7 +690,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: RoundedButtonFill(
title: 'Pay Now'.tr,
title: 'Pay Now'.tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () async {
@@ -738,7 +739,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Container(
margin: const EdgeInsets.only(top: 3),
child: Text(
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}" : "${coupon.discount} ${'% Off'.tr}",
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}" : "${coupon.discount} ${'% Off'.tr()}",
style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 0.7, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
@@ -751,7 +752,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Text(coupon.code ?? '', style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, letterSpacing: 0.5, color: Colors.orange)),
Container(margin: const EdgeInsets.only(left: 15, right: 15, top: 3), width: 1, color: AppThemeData.grey50),
Text(
"valid till ".tr + controller.getDate(coupon.expiresAt!.toDate().toString()),
"valid till ".tr() + controller.getDate(coupon.expiresAt!.toDate().toString()),
style: TextStyle(letterSpacing: 0.5, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
],
@@ -787,10 +788,10 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Promo Code".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
Text("Promo Code".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
const SizedBox(height: 5),
Text(
"Apply promo code".tr,
"Apply promo code".tr(),
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
overflow: TextOverflow.ellipsis,
),
@@ -846,12 +847,12 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Container(padding: const EdgeInsets.only(top: 30), child: const Image(image: AssetImage('assets/images/redeem_coupon.png'), width: 100)),
Container(
padding: const EdgeInsets.only(top: 20),
child: Text('Redeem Your Coupons'.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
child: Text('Redeem Your Coupons'.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
),
Center(
child: Container(
padding: const EdgeInsets.only(top: 10, left: 22, right: 22),
child: Text("Voucher or Coupon code".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
child: Text("Voucher or Coupon code".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
),
),
Container(
@@ -870,7 +871,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
controller: controller.couponTextController.value,
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Write Coupon Code".tr,
hintText: "Write Coupon Code".tr(),
hintStyle: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400),
),
),
@@ -881,7 +882,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 30, bottom: 30, left: 15, right: 15),
child: RoundedButtonFill(
title: "REDEEM NOW".tr,
title: "REDEEM NOW".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () {
@@ -899,7 +900,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
});
} else {
print("❌ No matching coupon found");
ShowToastDialog.showToast("Applied coupon not valid.".tr);
ShowToastDialog.showToast("Applied coupon not valid.".tr());
}
},
),
@@ -926,7 +927,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 5),
rowText(
"Price".tr,
"Price".tr(),
//Constant.amountShow(amount: controller.price.value.toString()),
controller.onProviderOrder.value?.provider.disPrice == "" || controller.onProviderOrder.value?.provider.disPrice == "0"
? "${Constant.amountShow(amount: controller.onProviderOrder.value?.provider.price.toString())} × ${controller.onProviderOrder.value?.quantity.toStringAsFixed(2)} ${Constant.amountShow(amount: controller.price.value.toString())}"
@@ -945,7 +946,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${"Discount".tr} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
"${"Discount".tr()} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
Text(controller.offerCode.value, style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
@@ -958,7 +959,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
)
: const SizedBox(),
const Divider(),
rowText("SubTotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
rowText("SubTotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
const Divider(),
ListView.builder(
itemCount: Constant.taxList.length,
@@ -992,7 +993,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
},
),
// Total Amount
rowText("Total Amount".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
rowText("Total Amount".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
const SizedBox(height: 5),
],
),
@@ -1017,23 +1018,23 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
return Get.dialog(
AlertDialog(
backgroundColor: isDark ? AppThemeData.greyDark50 : AppThemeData.grey50,
title: Text('Please give reason for canceling this Booking'.tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
title: Text('Please give reason for canceling this Booking'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
content: TextFormField(
controller: controller.cancelBookingController.value,
maxLines: 5,
decoration: InputDecoration(hintText: "Specify your reason here".tr, border: OutlineInputBorder(borderRadius: BorderRadius.circular(7))),
decoration: InputDecoration(hintText: "Specify your reason here".tr(), border: OutlineInputBorder(borderRadius: BorderRadius.circular(7))),
),
actions: [
TextButton(onPressed: () => Get.back(), child: Text('Cancel'.tr, style: TextStyle(color: Colors.red))),
TextButton(onPressed: () => Get.back(), child: Text('Cancel'.tr(), style: TextStyle(color: Colors.red))),
TextButton(
onPressed: () async {
if (controller.cancelBookingController.value.text.trim().isEmpty) {
ShowToastDialog.showToast("Please enter reason".tr);
ShowToastDialog.showToast("Please enter reason".tr());
} else {
await controller.cancelBooking();
}
},
child: Text('Continue'.tr, style: TextStyle(color: Colors.green)),
child: Text('Continue'.tr(), style: TextStyle(color: Colors.green)),
),
],
),

View File

@@ -1,4 +1,5 @@
import 'package:customer/constant/constant.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/0n_demand_payment_controller.dart';
@@ -39,7 +40,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Select Payment Method".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Select Payment Method".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -54,7 +55,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Preferred Payment".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Preferred Payment".tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
Container(
@@ -84,7 +85,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
children: [
const SizedBox(height: 10),
Text(
"Other Payment Options".tr,
"Other Payment Options".tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
),
@@ -132,7 +133,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
),
SizedBox(height: 20),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
@@ -156,9 +157,9 @@ class OnDemandPaymentScreen extends StatelessWidget {
double walletAmount = double.tryParse(Constant.userModel?.walletAmount?.toString() ?? "0") ?? 0;
if (walletAmount == 0) {
ShowToastDialog.showToast("Wallet balance is 0. Please recharge wallet.".tr);
ShowToastDialog.showToast("Wallet balance is 0. Please recharge wallet.".tr());
} else if (walletAmount < totalAmount) {
ShowToastDialog.showToast("Insufficient wallet balance. Please add funds.".tr);
ShowToastDialog.showToast("Insufficient wallet balance. Please add funds.".tr());
} else {
controller.placeOrder();
}
@@ -176,7 +177,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse("${controller.totalAmount.value}"), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: "${controller.totalAmount.value}", orderId: result.id);
@@ -184,7 +185,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
});
} else {
controller.isOrderPlaced.value = false;
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
controller.isOrderPlaced.value = false;
}

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
@@ -38,7 +39,7 @@ class OnDemandReviewScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text(controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text(controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -62,7 +63,7 @@ class OnDemandReviewScreen extends StatelessWidget {
padding: const EdgeInsets.only(top: 65),
child: Column(
children: [
Text('Rate for'.tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text('Rate for'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
controller.reviewFor.value == "Provider" ? controller.order.value!.provider.authorName ?? "" : controller.workerModel.value!.fullName(),
style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -83,11 +84,11 @@ class OnDemandReviewScreen extends StatelessWidget {
},
),
),
Padding(padding: EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr, controller: controller.comment, maxLine: 5)),
Padding(padding: EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr(), controller: controller.comment, maxLine: 5)),
Padding(
padding: const EdgeInsets.all(20.0),
child: RoundedButtonFill(
title: controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
title: controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: controller.submitReview,

View File

@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -27,7 +28,7 @@ class ProviderInboxScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Provider Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Provider Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body: FirestorePagination(
//item builder type is compulsory.
@@ -37,7 +38,7 @@ class ProviderInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
@@ -113,7 +114,7 @@ class ProviderInboxScreen extends StatelessWidget {
);
},
shrinkWrap: true,
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance.collection('chat_provider').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
//Change types customerId

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/constant.dart';
import 'package:customer/screen_ui/on_demand_service/on_demand_home_screen.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';
@@ -86,7 +87,7 @@ class ProviderScreen extends StatelessWidget {
const Divider(),
const SizedBox(height: 10),
controller.providerList.isEmpty
? Center(child: Text("No Services Found".tr))
? Center(child: Text("No Services Found".tr()))
: Expanded(
child: ListView.builder(
itemCount: controller.providerList.length,

View File

@@ -1,4 +1,5 @@
import 'package:customer/screen_ui/on_demand_service/on_demand_home_screen.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/constant.dart';
@@ -36,7 +37,7 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("All Services".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("All Services".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -48,10 +49,10 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 15),
child: Column(
children: [
TextFieldWidget(hintText: "Search Service".tr, controller: controller.searchTextFiledController.value, onchange: (value) => controller.getFilterData(value.toString())),
TextFieldWidget(hintText: "Search Service".tr(), controller: controller.searchTextFiledController.value, onchange: (value) => controller.getFilterData(value.toString())),
const SizedBox(height: 15),
controller.providerList.isEmpty
? Expanded(child: Center(child: Constant.showEmptyView(message: "No service Found".tr)))
? Expanded(child: Center(child: Constant.showEmptyView(message: "No service Found".tr())))
: Expanded(
child: ListView.builder(
itemCount: controller.providerList.length,

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/constant.dart';
@@ -45,7 +46,7 @@ class ViewCategoryServiceListScreen extends StatelessWidget {
controller.isLoading.value
? Constant.loader()
: controller.providerList.isEmpty
? Constant.showEmptyView(message: "No Service Found".tr)
? Constant.showEmptyView(message: "No Service Found".tr())
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: ListView.builder(

View File

@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -27,7 +28,7 @@ class WorkerInboxScreen extends StatelessWidget {
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
centerTitle: false,
titleSpacing: 0,
title: Text("Worker Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
title: Text("Worker Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
),
body: FirestorePagination(
//item builder type is compulsory.
@@ -37,7 +38,7 @@ class WorkerInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
@@ -114,7 +115,7 @@ class WorkerInboxScreen extends StatelessWidget {
);
},
shrinkWrap: true,
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
// orderBy is compulsory to enable pagination
query: FirebaseFirestore.instance.collection('chat_worker').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
//Change types customerId

View File

@@ -4,6 +4,7 @@ import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/utils.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:dropdown_textfield/dropdown_textfield.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
@@ -51,9 +52,9 @@ class BookParcelScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Book Your Document Delivery".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Book Your Document Delivery".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text(
"Schedule a secure and timely pickup & delivery".tr,
"Schedule a secure and timely pickup & delivery".tr(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppThemeData.mediumTextStyle(fontSize: 12, color: AppThemeData.grey900),
@@ -78,7 +79,7 @@ class BookParcelScreen extends StatelessWidget {
const SizedBox(height: 16),
buildInfoSectionView(
title: "Sender Information".tr,
title: "Sender Information".tr(),
locationController: controller.senderLocationController.value,
nameController: controller.senderNameController.value,
mobileController: controller.senderMobileController.value,
@@ -101,7 +102,7 @@ class BookParcelScreen extends StatelessWidget {
controller.senderLocationController.value.text = address; // ✅
controller.senderLocation.value = UserLocation(latitude: lat, longitude: lng); // ✅ <-- Add this
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
}
} else {
@@ -113,7 +114,7 @@ class BookParcelScreen extends StatelessWidget {
controller.senderLocationController.value.text = Utils.formatAddress(selectedLocation: selectedLocationModel);
controller.senderLocation.value = UserLocation(latitude: selectedLocationModel.latLng!.latitude, longitude: selectedLocationModel.latLng!.longitude);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
// ✅ <-- Add this
}
@@ -123,7 +124,7 @@ class BookParcelScreen extends StatelessWidget {
),
const SizedBox(height: 16),
buildInfoSectionView(
title: "Receiver Information".tr,
title: "Receiver Information".tr(),
locationController: controller.receiverLocationController.value,
nameController: controller.receiverNameController.value,
mobileController: controller.receiverMobileController.value,
@@ -147,7 +148,7 @@ class BookParcelScreen extends StatelessWidget {
controller.receiverLocationController.value.text = address; // ✅
controller.receiverLocation.value = UserLocation(latitude: lat, longitude: lng);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
}
} else {
@@ -159,7 +160,7 @@ class BookParcelScreen extends StatelessWidget {
controller.receiverLocationController.value.text = Utils.formatAddress(selectedLocation: selectedLocationModel);
controller.receiverLocation.value = UserLocation(latitude: selectedLocationModel.latLng!.latitude, longitude: selectedLocationModel.latLng!.longitude); // ✅ <-- Add this
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
}
});
@@ -170,7 +171,7 @@ class BookParcelScreen extends StatelessWidget {
const SizedBox(height: 15),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
onPress: () {
controller.bookNow();
},
@@ -197,7 +198,7 @@ class BookParcelScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Select delivery type".tr, style: AppThemeData.boldTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500, fontSize: 13)),
Text("Select delivery type".tr(), style: AppThemeData.boldTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500, fontSize: 13)),
const SizedBox(height: 10),
InkWell(
onTap: () {
@@ -208,7 +209,7 @@ class BookParcelScreen extends StatelessWidget {
children: [
Image.asset("assets/images/image_parcel.png", height: 38, width: 38),
const SizedBox(width: 20),
Expanded(child: Text("As soon as possible".tr, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16))),
Expanded(child: Text("As soon as possible".tr(), style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16))),
Icon(
controller.selectedDeliveryType.value == 'now' ? Icons.radio_button_checked : Icons.radio_button_off,
color: controller.selectedDeliveryType.value == 'now' ? AppThemeData.primary300 : (isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
@@ -229,7 +230,7 @@ class BookParcelScreen extends StatelessWidget {
children: [
Image.asset("assets/images/image_parcel_scheduled.png", height: 38, width: 38),
const SizedBox(width: 20),
Expanded(child: Text("Scheduled".tr, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16))),
Expanded(child: Text("Scheduled".tr(), style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16))),
Icon(
controller.selectedDeliveryType.value == 'later' ? Icons.radio_button_checked : Icons.radio_button_off,
color: controller.selectedDeliveryType.value == 'later' ? AppThemeData.primary300 : (isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
@@ -242,7 +243,7 @@ class BookParcelScreen extends StatelessWidget {
GestureDetector(
onTap: () => controller.pickScheduledDate(context),
child: TextFieldWidget(
hintText: "When to pickup at this address".tr,
hintText: "When to pickup at this address".tr(),
controller: controller.scheduledDateController.value,
enable: false,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
@@ -254,7 +255,7 @@ class BookParcelScreen extends StatelessWidget {
GestureDetector(
onTap: () => controller.pickScheduledTime(context),
child: TextFieldWidget(
hintText: "When to pickup at this address".tr,
hintText: "When to pickup at this address".tr(),
controller: controller.scheduledTimeController.value,
enable: false,
// onchange: (v) => controller.pickScheduledTime(context),
@@ -283,7 +284,7 @@ class BookParcelScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Upload parcel image".tr, style: AppThemeData.boldTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500, fontSize: 13)),
Text("Upload parcel image".tr(), style: AppThemeData.boldTextStyle(color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500, fontSize: 13)),
const SizedBox(height: 10),
DottedBorder(
options: RoundedRectDottedBorderOptions(strokeWidth: 1, radius: const Radius.circular(10), color: isDark ? AppThemeData.greyDark300 : AppThemeData.grey300),
@@ -296,13 +297,13 @@ class BookParcelScreen extends StatelessWidget {
children: [
SvgPicture.asset("assets/icons/ic_upload_parcel.svg", height: 40, width: 40),
const SizedBox(height: 10),
Text("Upload Parcel Image".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Upload Parcel Image".tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
const SizedBox(height: 4),
Text("Supported: .jpg, .jpeg, .png".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Max size 1MB".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Supported: .jpg, .jpeg, .png".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Max size 1MB".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
const SizedBox(height: 8),
RoundedButtonFill(
title: "Browse Image".tr,
title: "Browse Image".tr(),
onPress: () {
controller.onCameraClick(Get.context!);
},
@@ -378,7 +379,7 @@ class BookParcelScreen extends StatelessWidget {
GestureDetector(
onTap: onTap,
child: TextFieldWidget(
hintText: "Your Location".tr,
hintText: "Your Location".tr(),
controller: locationController,
suffix: const Padding(padding: EdgeInsets.only(right: 10), child: Icon(Icons.location_on_outlined)),
@@ -390,7 +391,7 @@ class BookParcelScreen extends StatelessWidget {
const SizedBox(height: 10),
TextFieldWidget(
hintText: "Name".tr,
hintText: "Name".tr(),
controller: nameController,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
borderColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,
@@ -398,7 +399,7 @@ class BookParcelScreen extends StatelessWidget {
const SizedBox(height: 10),
TextFieldWidget(
hintText: "Enter Mobile number".tr,
hintText: "Enter Mobile number".tr(),
controller: mobileController,
textInputType: TextInputType.number,
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(10)],
@@ -435,7 +436,7 @@ class BookParcelScreen extends StatelessWidget {
clearOption: false,
enableSearch: false,
textFieldDecoration: InputDecoration(
hintText: "Select parcel Weight".tr,
hintText: "Select parcel Weight".tr(),
hintStyle: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.grey400 : AppThemeData.greyDark400),
filled: true,
fillColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
@@ -447,8 +448,8 @@ class BookParcelScreen extends StatelessWidget {
dropDownList:
controller.parcelWeight.map((e) {
return DropDownValueModel(
name: e.title ?? 'Normal'.tr,
value: e.title ?? 'Normal'.tr, // safer to use title string
name: e.title ?? 'Normal'.tr(),
value: e.title ?? 'Normal'.tr(), // safer to use title string
);
}).toList(),
onChanged: (val) {
@@ -464,7 +465,7 @@ class BookParcelScreen extends StatelessWidget {
const SizedBox(height: 10),
TextFieldWidget(
hintText: "Notes (Optional)".tr,
hintText: "Notes (Optional)".tr(),
controller: noteController,
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
borderColor: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200,

View File

@@ -1,4 +1,5 @@
import 'package:customer/constant/constant.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
import 'package:geolocator/geolocator.dart';
@@ -59,7 +60,7 @@ class HomeParcelScreen extends StatelessWidget {
onTap: () {
Get.offAll(const LoginScreen());
},
child: Text("Login".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
child: Text("Login".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
)
: Text(Constant.userModel!.fullName(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
InkWell(
@@ -74,7 +75,7 @@ class HomeParcelScreen extends StatelessWidget {
} else {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
ShippingAddress shippingAddress = ShippingAddress();
@@ -159,7 +160,7 @@ class HomeParcelScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("What are you sending?".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("What are you sending?".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
const SizedBox(height: 12),
Container(
decoration: BoxDecoration(

View File

@@ -1,6 +1,7 @@
import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/screen_ui/parcel_service/parcel_order_details.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/constant.dart';
@@ -29,7 +30,7 @@ class MyBookingScreen extends StatelessWidget {
backgroundColor: AppThemeData.primary300,
title: Padding(
padding: const EdgeInsets.only(bottom: 10),
child: Row(children: [const SizedBox(width: 10), Text("Parcel History".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))]),
child: Row(children: [const SizedBox(width: 10), Text("Parcel History".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))]),
),
bottom: TabBar(
// don't re-subscribe onTap — just update selectedTab (optional)
@@ -55,16 +56,16 @@ class MyBookingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -82,7 +83,7 @@ class MyBookingScreen extends StatelessWidget {
final orders = controller.getOrdersForTab(title);
if (orders.isEmpty) {
return Center(child: Text("No orders found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
return Center(child: Text("No orders found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
}
return ListView.builder(
@@ -108,7 +109,7 @@ class MyBookingScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
"${'Order Date:'.tr}${order.isSchedule == true ? controller.formatDate(order.createdAt!) : controller.formatDate(order.senderPickupDateTime!)}",
"${'Order Date:'.tr()}${order.isSchedule == true ? controller.formatDate(order.createdAt!) : controller.formatDate(order.senderPickupDateTime!)}",
style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.info400),
),
),
@@ -140,7 +141,7 @@ class MyBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_infoSection(
"Pickup Address (Sender):".tr,
"Pickup Address (Sender):".tr(),
order.sender?.name ?? '',
order.sender?.address ?? '',
order.sender?.phone ?? '',
@@ -152,7 +153,7 @@ class MyBookingScreen extends StatelessWidget {
),
const SizedBox(height: 16),
_infoSection(
"Delivery Address (Receiver):".tr,
"Delivery Address (Receiver):".tr(),
order.receiver?.name ?? '',
order.receiver?.address ?? '',
order.receiver?.phone ?? '',

View File

@@ -1,4 +1,5 @@
import 'package:customer/screen_ui/parcel_service/parcel_dashboard_screen.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:customer/themes/app_them_data.dart';
@@ -28,7 +29,7 @@ class OrderSuccessfullyPlaced extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 25),
child: Text(
"Your Order Has Been Placed!".tr,
"Your Order Has Been Placed!".tr(),
style: AppThemeData.boldTextStyle(fontSize: 22, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
textAlign: TextAlign.center,
),
@@ -37,14 +38,14 @@ class OrderSuccessfullyPlaced extends StatelessWidget {
Padding(
padding: const EdgeInsets.symmetric(horizontal: 50),
child: Text(
"Weve received your parcel booking and its now being processed. You can track its status in real time.".tr,
"Weve received your parcel booking and its now being processed. You can track its status in real time.".tr(),
style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark600 : AppThemeData.grey600),
textAlign: TextAlign.center,
),
),
const SizedBox(height: 30),
RoundedButtonFill(
title: "Track Your Order".tr,
title: "Track Your Order".tr(),
onPress: () {
print("Tracking Order: $parcelOrder");
//Get.to(() => TrackOrderScreen(), arguments: {'order': parcelOrder});

View File

@@ -6,6 +6,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/widget/my_separator.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -37,7 +38,7 @@ class ParcelCouponScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Coupon".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Coupon".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -46,7 +47,7 @@ class ParcelCouponScreen extends StatelessWidget {
controller.isLoading.value
? Constant.loader()
: controller.cabCouponList.isEmpty
? Constant.showEmptyView(message: "Coupon not found".tr)
? Constant.showEmptyView(message: "Coupon not found".tr())
: ListView.builder(
shrinkWrap: true,
itemCount: controller.cabCouponList.length,
@@ -71,7 +72,7 @@ class ParcelCouponScreen extends StatelessWidget {
child: RotatedBox(
quarterTurns: -1,
child: Text(
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr}",
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
),
@@ -106,7 +107,7 @@ class ParcelCouponScreen extends StatelessWidget {
Get.back(result: couponModel);
},
child: Text(
"Tap To Apply".tr,
"Tap To Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),

View File

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/parcel_dashboard_controller.dart';
import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -39,15 +40,15 @@ class ParcelDashboardScreen extends StatelessWidget {
items:
Constant.walletSetting == false
? [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_parcel.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_mybooking_parcel.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_profile_parcel.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_parcel.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_mybooking_parcel.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_profile_parcel.svg", label: 'Profile'.tr(), controller: controller),
]
: [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_parcel.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_mybooking_parcel.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet_parcel.svg", label: 'Wallet'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile_parcel.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_parcel.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_mybooking_parcel.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet_parcel.svg", label: 'Wallet'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile_parcel.svg", label: 'Profile'.tr(), controller: controller),
],
),
);
@@ -62,8 +63,8 @@ class ParcelDashboardScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 5),
child: SvgPicture.asset(
assetIcon,
height: label == 'Wallet'.tr ? 18 : 22,
width: label == 'Wallet'.tr ? 18 : 22,
height: label == 'Wallet'.tr() ? 18 : 22,
width: label == 'Wallet'.tr() ? 18 : 22,
color:
controller.selectedIndex.value == index
? isDark

View File

@@ -1,6 +1,7 @@
import 'package:customer/models/coupon_model.dart';
import 'package:customer/screen_ui/parcel_service/parcel_coupon_screen.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
@@ -42,7 +43,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Order Confirmation".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Order Confirmation".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -93,7 +94,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_infoSection(
"Pickup Address (Sender):".tr,
"Pickup Address (Sender):".tr(),
controller.parcelOrder.value.sender?.name ?? '',
controller.parcelOrder.value.sender?.address ?? '',
controller.parcelOrder.value.sender?.phone ?? '',
@@ -104,7 +105,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
const SizedBox(height: 16),
_infoSection(
"Delivery Address (Receiver):".tr,
"Delivery Address (Receiver):".tr(),
controller.parcelOrder.value.receiver?.name ?? '',
controller.parcelOrder.value.receiver?.address ?? '',
controller.parcelOrder.value.receiver?.phone ?? '',
@@ -131,9 +132,9 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_iconTile("${controller.parcelOrder.value.distance ?? '--'} ${'KM'.tr}", "Distance".tr, "assets/icons/ic_distance_parcel.svg", isDark),
_iconTile(controller.parcelOrder.value.parcelWeight ?? '--', "Weight".tr, "assets/icons/ic_weight_parcel.svg", isDark),
_iconTile(Constant.amountShow(amount: controller.parcelOrder.value.subTotal), "Rate".tr, "assets/icons/ic_rate_parcel.svg", isDark),
_iconTile("${controller.parcelOrder.value.distance ?? '--'} ${'KM'.tr()}", "Distance".tr(), "assets/icons/ic_distance_parcel.svg", isDark),
_iconTile(controller.parcelOrder.value.parcelWeight ?? '--', "Weight".tr(), "assets/icons/ic_weight_parcel.svg", isDark),
_iconTile(Constant.amountShow(amount: controller.parcelOrder.value.subTotal), "Rate".tr(), "assets/icons/ic_rate_parcel.svg", isDark),
],
),
),
@@ -142,7 +143,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
Row(
children: [
Expanded(child: Text("Coupons".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
Expanded(child: Text("Coupons".tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
InkWell(
onTap: () {
Get.to(ParcelCouponScreen())!.then((value) {
@@ -152,13 +153,13 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
controller.selectedCouponModel.value = value;
controller.calculatePrice();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast("This offer not eligible for this booking".tr());
}
}
});
},
child: Text(
"View All".tr,
"View All".tr(),
style: AppThemeData.boldTextStyle(decoration: TextDecoration.underline, fontSize: 14, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
),
@@ -181,14 +182,14 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
controller: controller.couponController.value,
style: AppThemeData.semiBoldTextStyle(color: AppThemeData.parcelService500, fontSize: 16),
decoration: InputDecoration(
hintText: "Write coupon code".tr,
hintText: "Write coupon code".tr(),
hintStyle: AppThemeData.mediumTextStyle(fontSize: 16, color: AppThemeData.parcelService500),
border: InputBorder.none,
),
),
),
RoundedButtonFill(
title: "Redeem now".tr,
title: "Redeem now".tr(),
onPress: () {
if (controller.couponList.where((element) => element.code!.toLowerCase() == controller.couponController.value.text.toLowerCase()).isNotEmpty) {
CouponModel couponModel = controller.couponList.firstWhere((p0) => p0.code!.toLowerCase() == controller.couponController.value.text.toLowerCase());
@@ -199,13 +200,13 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
controller.calculatePrice();
controller.update();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast("This offer not eligible for this booking".tr());
}
} else {
ShowToastDialog.showToast("This coupon code has been expired".tr);
ShowToastDialog.showToast("This coupon code has been expired".tr());
}
} else {
ShowToastDialog.showToast("Invalid coupon code".tr);
ShowToastDialog.showToast("Invalid coupon code".tr());
}
},
borderRadius: 10,
@@ -230,14 +231,14 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
Text("Order Summary".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
const SizedBox(height: 8),
// Subtotal
_summaryTile("Subtotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
_summaryTile("Subtotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
// Discount
_summaryTile("Discount".tr, "-${Constant.amountShow(amount: controller.discount.value.toString())}", isDark, AppThemeData.dangerDark300),
_summaryTile("Discount".tr(), "-${Constant.amountShow(amount: controller.discount.value.toString())}", isDark, AppThemeData.dangerDark300),
// Tax List
...List.generate(Constant.taxList.length, (index) {
@@ -251,7 +252,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
const Divider(),
// Total
_summaryTile("Order Total".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
_summaryTile("Order Total".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
],
),
),
@@ -267,7 +268,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Title
Text("Payment by".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Payment by".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 12),
// Row with Sender and Receiver options
@@ -284,7 +285,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
size: 20,
),
const SizedBox(width: 6),
Text("Sender".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Sender".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
],
),
),
@@ -302,7 +303,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
size: 20,
),
const SizedBox(width: 6),
Text("Receiver".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Receiver".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
],
),
),
@@ -316,7 +317,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
// Continue button
RoundedButtonFill(
title: controller.paymentBy.value == "Sender" ? "Select Payment Method".tr : "Continue".tr,
title: controller.paymentBy.value == "Sender" ? "Select Payment Method".tr() : "Continue".tr(),
onPress: () async {
if (controller.paymentBy.value == "Sender") {
Get.bottomSheet(
@@ -394,7 +395,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Select Payment Method".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Select Payment Method".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
GestureDetector(
onTap: () {
Get.back();
@@ -408,7 +409,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
child: ListView(
controller: scrollController,
children: [
Text("Preferred Payment".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Preferred Payment".tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
Container(
@@ -434,7 +435,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true) const SizedBox(height: 10),
Text("Other Payment Options".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Other Payment Options".tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
Container(
decoration: BoxDecoration(
@@ -474,7 +475,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
color: AppThemeData.taxiBooking300,
textColor: AppThemeData.grey900,
onPress: () async {
@@ -496,7 +497,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
double walletBalance = double.tryParse(controller.userModel.value.walletAmount.toString()) ?? 0.0;
double amountToPay = double.tryParse(controller.totalAmount.value.toString()) ?? 0.0;
if (walletBalance < amountToPay) {
ShowToastDialog.showToast("Insufficient wallet balance".tr);
ShowToastDialog.showToast("Insufficient wallet balance".tr());
return;
}
controller.placeOrder();
@@ -514,14 +515,14 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse(controller.totalAmount.value.toString()), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.totalAmount.value.toString(), orderId: result.id);
}
});
} else {
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
},
),

View File

@@ -1,5 +1,6 @@
import 'package:customer/screen_ui/parcel_service/parcel_review_screen.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
@@ -48,9 +49,9 @@ class ParcelOrderDetails extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Details".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Order Details".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text(
"Your parcel is on the way. Track it in real time below.".tr,
"Your parcel is on the way. Track it in real time below.".tr(),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.grey900),
@@ -79,7 +80,7 @@ class ParcelOrderDetails extends StatelessWidget {
width: double.infinity,
padding: const EdgeInsets.all(16),
child: Text(
"${'Order Id:'.tr} ${Constant.orderId(orderId: controller.parcelOrder.value.id.toString())}".tr,
"${'Order Id:'.tr()} ${Constant.orderId(orderId: controller.parcelOrder.value.id.toString())}".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 18, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
),
@@ -125,7 +126,7 @@ class ParcelOrderDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_infoSection(
"Pickup Address (Sender):".tr,
"Pickup Address (Sender):".tr(),
controller.parcelOrder.value.sender?.name ?? '',
controller.parcelOrder.value.sender?.address ?? '',
controller.parcelOrder.value.sender?.phone ?? '',
@@ -136,7 +137,7 @@ class ParcelOrderDetails extends StatelessWidget {
),
const SizedBox(height: 16),
_infoSection(
"Delivery Address (Receiver):".tr,
"Delivery Address (Receiver):".tr(),
controller.parcelOrder.value.receiver?.name ?? '',
controller.parcelOrder.value.receiver?.address ?? '',
controller.parcelOrder.value.receiver?.phone ?? '',
@@ -157,7 +158,7 @@ class ParcelOrderDetails extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
"${'Schedule Pickup time:'.tr} ${controller.formatDate(controller.parcelOrder.value.senderPickupDateTime!)}",
"${'Schedule Pickup time:'.tr()} ${controller.formatDate(controller.parcelOrder.value.senderPickupDateTime!)}",
style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.info400),
),
),
@@ -165,7 +166,7 @@ class ParcelOrderDetails extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
"${'Order Date:'.tr}${controller.parcelOrder.value.isSchedule == true ? controller.formatDate(controller.parcelOrder.value.createdAt!) : controller.formatDate(controller.parcelOrder.value.senderPickupDateTime!)}",
"${'Order Date:'.tr()}${controller.parcelOrder.value.isSchedule == true ? controller.formatDate(controller.parcelOrder.value.createdAt!) : controller.formatDate(controller.parcelOrder.value.senderPickupDateTime!)}",
style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.info400),
),
),
@@ -173,7 +174,7 @@ class ParcelOrderDetails extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Parcel Type:".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text("Parcel Type:".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Row(
children: [
Text(
@@ -221,9 +222,9 @@ class ParcelOrderDetails extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_iconTile("${controller.parcelOrder.value.distance ?? '--'} ${Constant.distanceType}", "Distance".tr, "assets/icons/ic_distance_parcel.svg", isDark),
_iconTile(controller.parcelOrder.value.parcelWeight ?? '--', "Weight".tr, "assets/icons/ic_weight_parcel.svg", isDark),
_iconTile(Constant.amountShow(amount: controller.parcelOrder.value.subTotal), "Rate".tr, "assets/icons/ic_rate_parcel.svg", isDark),
_iconTile("${controller.parcelOrder.value.distance ?? '--'} ${Constant.distanceType}", "Distance".tr(), "assets/icons/ic_distance_parcel.svg", isDark),
_iconTile(controller.parcelOrder.value.parcelWeight ?? '--', "Weight".tr(), "assets/icons/ic_weight_parcel.svg", isDark),
_iconTile(Constant.amountShow(amount: controller.parcelOrder.value.subTotal), "Rate".tr(), "assets/icons/ic_rate_parcel.svg", isDark),
],
),
),
@@ -241,7 +242,7 @@ class ParcelOrderDetails extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("About Driver".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("About Driver".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -284,7 +285,7 @@ class ParcelOrderDetails extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: RoundedButtonFill(
title: controller.ratingModel.value.id != null && controller.ratingModel.value.id!.isNotEmpty ? 'Update Review'.tr : 'Add Review'.tr,
title: controller.ratingModel.value.id != null && controller.ratingModel.value.id!.isNotEmpty ? 'Update Review'.tr() : 'Add Review'.tr(),
onPress: () async {
final result = await Get.to(() => ParcelReviewScreen(), arguments: {'order': controller.parcelOrder.value});
@@ -323,7 +324,7 @@ class ParcelOrderDetails extends StatelessWidget {
const SizedBox(width: 10),
InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(controller.parcelOrder.value.authorID ?? '');
UserModel? driverUser = await FireStoreUtils.getUserProfile(controller.parcelOrder.value.driverId ?? '');
@@ -375,14 +376,14 @@ class ParcelOrderDetails extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
Text("Order Summary".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
const SizedBox(height: 8),
// Subtotal
_summaryTile("Subtotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
_summaryTile("Subtotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
// Discount
_summaryTile("Discount".tr, Constant.amountShow(amount: controller.discount.value.toString()), isDark),
_summaryTile("Discount".tr(), Constant.amountShow(amount: controller.discount.value.toString()), isDark),
// Tax List
...List.generate(controller.parcelOrder.value.taxSetting!.length, (index) {
@@ -404,7 +405,7 @@ class ParcelOrderDetails extends StatelessWidget {
const Divider(),
// Total
_summaryTile("Order Total".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
_summaryTile("Order Total".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
],
),
),
@@ -416,7 +417,7 @@ class ParcelOrderDetails extends StatelessWidget {
? Padding(
padding: const EdgeInsets.all(16.0),
child: RoundedButtonFill(
title: "Cancel Parcel".tr,
title: "Cancel Parcel".tr(),
onPress: () {
controller.cancelParcelOrder();
},
@@ -447,7 +448,7 @@ class ParcelOrderDetails extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Parcel Status Timeline".tr, style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 18)),
Text("Parcel Status Timeline".tr(), style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 18)),
const SizedBox(height: 8),
// Dynamic List
@@ -457,7 +458,7 @@ class ParcelOrderDetails extends StatelessWidget {
if (history.isEmpty) {
return SizedBox(
height: 80,
child: Center(child: Text("No status updates yet".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
child: Center(child: Text("No status updates yet".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
);
}
@@ -531,7 +532,7 @@ class ParcelOrderDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(title, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800)),
Text(value, style: AppThemeData.semiBoldTextStyle(fontSize: title == "Order Total".tr ? 18 : 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(value, style: AppThemeData.semiBoldTextStyle(fontSize: title == "Order Total".tr() ? 18 : 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
],
),
);

View File

@@ -1,4 +1,5 @@
import 'package:customer/controllers/parcel_review_controller.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
@@ -27,7 +28,7 @@ class ParcelReviewScreen extends StatelessWidget {
backgroundColor: AppThemeData.primary300,
leading: GestureDetector(onTap: () => Get.back(), child: Icon(Icons.arrow_back_ios, color: isDark ? Colors.white : Colors.black)),
title: Text(
controller.ratingModel.value != null && controller.ratingModel.value!.id!.isNotEmpty ? "Update Review".tr : "Add Review".tr,
controller.ratingModel.value != null && controller.ratingModel.value!.id!.isNotEmpty ? "Update Review".tr() : "Add Review".tr(),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 16),
),
),
@@ -64,12 +65,12 @@ class ParcelReviewScreen extends StatelessWidget {
// Title
Padding(
padding: const EdgeInsets.only(top: 16),
child: Text('How is your trip?'.tr, style: TextStyle(fontSize: 18, color: isDark ? Colors.white : Colors.black, fontWeight: FontWeight.bold, letterSpacing: 2)),
child: Text('How is your trip?'.tr(), style: TextStyle(fontSize: 18, color: isDark ? Colors.white : Colors.black, fontWeight: FontWeight.bold, letterSpacing: 2)),
),
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
'Your feedback will help us improve \n driving experience better'.tr,
'Your feedback will help us improve \n driving experience better'.tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8),
),
@@ -78,7 +79,7 @@ class ParcelReviewScreen extends StatelessWidget {
// Rating
Padding(
padding: const EdgeInsets.only(top: 20),
child: Text('Rate for'.tr, style: TextStyle(fontSize: 16, color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8)),
child: Text('Rate for'.tr(), style: TextStyle(fontSize: 16, color: isDark ? Colors.white : Colors.black.withOpacity(0.60), letterSpacing: 0.8)),
),
Padding(
padding: const EdgeInsets.only(top: 8),
@@ -102,13 +103,13 @@ class ParcelReviewScreen extends StatelessWidget {
),
// Comment
Padding(padding: const EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr, controller: controller.comment.value, maxLine: 5)),
Padding(padding: const EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr(), controller: controller.comment.value, maxLine: 5)),
// Submit Button
Padding(
padding: const EdgeInsets.all(20.0),
child: RoundedButtonFill(
title: controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
title: controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
color: AppThemeData.primary300,
textColor: isDark ? Colors.white : Colors.black,
onPress: controller.submitReview,

View File

@@ -4,6 +4,7 @@ import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_screen.dart';
import 'package:customer/screen_ui/rental_service/rental_order_details_screen.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/constant.dart';
@@ -31,7 +32,7 @@ class MyRentalBookingScreen extends StatelessWidget {
backgroundColor: AppThemeData.primary300,
title: Padding(
padding: const EdgeInsets.only(bottom: 10),
child: Row(children: [const SizedBox(width: 10), Text("Rental History".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))]),
child: Row(children: [const SizedBox(width: 10), Text("Rental History".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))]),
),
bottom: TabBar(
onTap: (index) {
@@ -55,16 +56,16 @@ class MyRentalBookingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr,
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
),
const SizedBox(height: 20),
RoundedButtonFill(
title: "Log in".tr,
title: "Log in".tr(),
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -82,7 +83,7 @@ class MyRentalBookingScreen extends StatelessWidget {
List<RentalOrderModel> orders = controller.getOrdersForTab(title);
if (orders.isEmpty) {
return Center(child: Text("No orders found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
return Center(child: Text("No orders found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
}
return ListView.builder(
padding: const EdgeInsets.all(16),
@@ -151,7 +152,7 @@ class MyRentalBookingScreen extends StatelessWidget {
],
),
const SizedBox(height: 12),
Text("Vehicle Type :".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Vehicle Type :".tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Row(
@@ -195,7 +196,7 @@ class MyRentalBookingScreen extends StatelessWidget {
],
),
),
Text("Package info :".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Package info :".tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
child: Row(
@@ -226,7 +227,7 @@ class MyRentalBookingScreen extends StatelessWidget {
),
),
if (Constant.isEnableOTPTripStartForRental == true)
Text("${'OTP :'.tr} ${order.otpCode}", style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("${'OTP :'.tr()} ${order.otpCode}", style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
SizedBox(height: 10),
Row(
children: [

View File

@@ -4,6 +4,7 @@ import 'package:customer/screen_ui/rental_service/rental_coupon_screen.dart';
import 'package:customer/themes/show_toast_dialog.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/svg.dart';
import 'package:get/get.dart';
@@ -42,7 +43,7 @@ class RentalConformationScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Confirm Rent a Car".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Confirm Rent a Car".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -98,7 +99,7 @@ class RentalConformationScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Your Preference".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Your Preference".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -140,7 +141,7 @@ class RentalConformationScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Vehicle Type".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Vehicle Type".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -175,7 +176,7 @@ class RentalConformationScreen extends StatelessWidget {
Row(
children: [
Expanded(child: Text("Coupons".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
Expanded(child: Text("Coupons".tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
InkWell(
onTap: () {
Get.to(RentalCouponScreen())!.then((value) {
@@ -185,13 +186,13 @@ class RentalConformationScreen extends StatelessWidget {
controller.selectedCouponModel.value = value;
controller.calculateAmount();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast("This offer not eligible for this booking".tr());
}
}
});
},
child: Text(
"View All".tr,
"View All".tr(),
style: AppThemeData.boldTextStyle(decoration: TextDecoration.underline, fontSize: 14, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
),
@@ -214,14 +215,14 @@ class RentalConformationScreen extends StatelessWidget {
controller: controller.couponController.value,
style: AppThemeData.semiBoldTextStyle(color: AppThemeData.grey900),
decoration: InputDecoration(
hintText: "Write coupon code".tr,
hintText: "Write coupon code".tr(),
hintStyle: AppThemeData.mediumTextStyle(fontSize: 16, color: AppThemeData.parcelService500),
border: InputBorder.none,
),
),
),
RoundedButtonFill(
title: "Redeem now".tr,
title: "Redeem now".tr(),
onPress: () {
if (controller.couponList.where((element) => element.code!.toLowerCase() == controller.couponController.value.text.toLowerCase()).isNotEmpty) {
CouponModel couponModel = controller.couponList.firstWhere((p0) => p0.code!.toLowerCase() == controller.couponController.value.text.toLowerCase());
@@ -232,13 +233,13 @@ class RentalConformationScreen extends StatelessWidget {
controller.calculateAmount();
controller.update();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast("This offer not eligible for this booking".tr());
}
} else {
ShowToastDialog.showToast("This coupon code has been expired".tr);
ShowToastDialog.showToast("This coupon code has been expired".tr());
}
} else {
ShowToastDialog.showToast("Invalid coupon code".tr);
ShowToastDialog.showToast("Invalid coupon code".tr());
}
},
borderRadius: 10,
@@ -263,14 +264,14 @@ class RentalConformationScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
Text("Order Summary".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
const SizedBox(height: 8),
// Subtotal
_summaryTile("Subtotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
_summaryTile("Subtotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
// Discount
_summaryTile("Discount".tr, Constant.amountShow(amount: controller.discount.value.toString()), isDark, AppThemeData.dangerDark300),
_summaryTile("Discount".tr(), Constant.amountShow(amount: controller.discount.value.toString()), isDark, AppThemeData.dangerDark300),
// Tax List
...List.generate(controller.rentalOrderModel.value.taxSetting!.length, (index) {
@@ -294,13 +295,13 @@ class RentalConformationScreen extends StatelessWidget {
const Divider(),
// Total
_summaryTile("Order Total".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
_summaryTile("Order Total".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
],
),
),
SizedBox(height: 20),
RoundedButtonFill(
title: "Book now".tr,
title: "Book now".tr(),
onPress: () {
controller.placeOrder();
},

View File

@@ -6,6 +6,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/widget/my_separator.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -37,7 +38,7 @@ class RentalCouponScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Coupon".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Coupon".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -46,7 +47,7 @@ class RentalCouponScreen extends StatelessWidget {
controller.isLoading.value
? Constant.loader()
: controller.cabCouponList.isEmpty
? Constant.showEmptyView(message: "Coupon not found".tr)
? Constant.showEmptyView(message: "Coupon not found".tr())
: ListView.builder(
shrinkWrap: true,
itemCount: controller.cabCouponList.length,
@@ -71,7 +72,7 @@ class RentalCouponScreen extends StatelessWidget {
child: RotatedBox(
quarterTurns: -1,
child: Text(
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr}",
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
),
@@ -106,7 +107,7 @@ class RentalCouponScreen extends StatelessWidget {
Get.back(result: couponModel);
},
child: Text(
"Tap To Apply".tr,
"Tap To Apply".tr(),
textAlign: TextAlign.start,
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),

View File

@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/cab_dashboard_controller.dart';
import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/themes/app_them_data.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';
@@ -40,15 +41,15 @@ class RentalDashboardScreen extends StatelessWidget {
items:
Constant.walletSetting == false
? [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
]
: [
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr, controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr(), controller: controller),
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
],
),
);

View File

@@ -1,5 +1,6 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/constant/constant.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/rental_home_controller.dart';
@@ -57,7 +58,7 @@ class RentalHomeScreen extends StatelessWidget {
onTap: () {
Get.offAll(const LoginScreen());
},
child: Text("Login".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
child: Text("Login".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
)
: Text(Constant.userModel!.fullName(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900)),
],
@@ -92,7 +93,7 @@ class RentalHomeScreen extends StatelessWidget {
controller.sourceTextEditController.value.text = address;
controller.departureLatLongOsm.value = latlong.LatLng(lat, lng);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
}
} else {
@@ -104,7 +105,7 @@ class RentalHomeScreen extends StatelessWidget {
controller.sourceTextEditController.value.text = Utils.formatAddress(selectedLocation: selectedLocationModel);
controller.departureLatLong.value = latlong.LatLng(selectedLocationModel.latLng!.latitude, selectedLocationModel.latLng!.longitude);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr());
}
}
});
@@ -113,8 +114,8 @@ class RentalHomeScreen extends StatelessWidget {
hoverColor: Colors.transparent,
child: TextFieldWidget(
controller: controller.sourceTextEditController.value,
hintText: "Your current location".tr,
title: "Pickup Location".tr,
hintText: "Your current location".tr(),
title: "Pickup Location".tr(),
enable: false,
prefix: Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.stop_circle_outlined, color: Colors.green)),
),
@@ -124,7 +125,7 @@ class RentalHomeScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("Select Your Vehicle Type".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Select Your Vehicle Type".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
const SizedBox(width: 10),
GestureDetector(
onTap: () => controller.pickDate(context),
@@ -247,27 +248,27 @@ class RentalHomeScreen extends StatelessWidget {
),
const SizedBox(height: 25),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
onPress: () async {
final sourceText = controller.sourceTextEditController.value.text.trim();
if (Constant.userModel == null) {
ShowToastDialog.showToast("Please login to continue".tr);
ShowToastDialog.showToast("Please login to continue".tr());
return;
}
if (sourceText.isEmpty) {
ShowToastDialog.showToast("Please select source location".tr);
ShowToastDialog.showToast("Please select source location".tr());
return;
}
if (controller.selectedVehicleType.value == null) {
ShowToastDialog.showToast("Please select a vehicle type".tr);
ShowToastDialog.showToast("Please select a vehicle type".tr());
return;
}
await controller.getRentalPackage();
if (controller.rentalPackages.isEmpty) {
ShowToastDialog.showToast("No preference available for the selected vehicle type".tr);
ShowToastDialog.showToast("No preference available for the selected vehicle type".tr());
return;
}
@@ -308,7 +309,7 @@ class RentalHomeScreen extends StatelessWidget {
alignment: Alignment.topLeft,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text("Select Preferences".tr, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: isDark ? Colors.white : Colors.black)),
child: Text("Select Preferences".tr(), style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: isDark ? Colors.white : Colors.black)),
),
),
@@ -398,7 +399,7 @@ class RentalHomeScreen extends StatelessWidget {
const SizedBox(height: 10),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
onPress: () {
Get.bottomSheet(paymentBottomSheet(context, controller, isDark), isScrollControlled: true, backgroundColor: Colors.transparent);
},
@@ -434,7 +435,7 @@ class RentalHomeScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Select Payment Method".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Select Payment Method".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
GestureDetector(onTap: () => Get.back(), child: const Icon(Icons.close)),
],
),
@@ -446,7 +447,7 @@ class RentalHomeScreen extends StatelessWidget {
padding: EdgeInsets.zero,
controller: scrollController,
children: [
Text("Preferred Payment".tr, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Preferred Payment".tr(), style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
@@ -478,7 +479,7 @@ class RentalHomeScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 10),
Text("Other Payment Options".tr, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Other Payment Options".tr(), style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
],
),
@@ -524,12 +525,12 @@ class RentalHomeScreen extends StatelessWidget {
// Continue button
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast("Please select a payment method".tr);
ShowToastDialog.showToast("Please select a payment method".tr());
return;
}
@@ -539,7 +540,7 @@ class RentalHomeScreen extends StatelessWidget {
num baseFare = double.tryParse(controller.selectedPackage.value?.baseFare.toString() ?? "0") ?? 0;
if (walletAmount < baseFare) {
ShowToastDialog.showToast("You do not have sufficient wallet balance".tr);
ShowToastDialog.showToast("You do not have sufficient wallet balance".tr());
return;
}
}

View File

@@ -7,6 +7,7 @@ import 'package:customer/screen_ui/rental_service/rental_review_screen.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/svg.dart';
@@ -50,7 +51,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
),
),
const SizedBox(width: 10),
Text("Order Details".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text("Order Details".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
],
),
),
@@ -80,14 +81,15 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"${'Booking Id :'.tr} ${controller.order.value.id}",
"${'Booking Id :'.tr()} ${controller.order.value.id}",
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark700 : AppThemeData.grey700),
),
),
InkWell(
onTap: () {
Clipboard.setData(ClipboardData(text: controller.order.value.id.toString()));
ShowToastDialog.showToast("Booking ID copied to clipboard".tr);
ShowToastDialog.showToast("Booking ID copied to clipboard".tr());
},
child: Icon(Icons.copy),
),
@@ -132,7 +134,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Your Preference".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Your Preference".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
SizedBox(height: 10),
Row(
@@ -178,7 +180,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("About Driver".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("About Driver".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -234,7 +236,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: RoundedButtonFill(
title: controller.ratingModel.value.id != null && controller.ratingModel.value.id!.isNotEmpty ? 'Update Review'.tr : 'Add Review'.tr,
title: controller.ratingModel.value.id != null && controller.ratingModel.value.id!.isNotEmpty ? 'Update Review'.tr() : 'Add Review'.tr(),
onPress: () async {
final result = await Get.to(() => RentalReviewScreen(), arguments: {'order': controller.order.value});
@@ -274,7 +276,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
const SizedBox(width: 10),
InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader("Please wait...".tr());
UserModel? customer = await FireStoreUtils.getUserProfile(controller.order.value.authorID ?? '');
UserModel? driverUser = await FireStoreUtils.getUserProfile(controller.order.value.driverId ?? '');
@@ -327,7 +329,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Vehicle Type".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Vehicle Type".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
SizedBox(height: 10),
Row(
children: [
@@ -371,7 +373,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Rental Details".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Rental Details".tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Divider(color: isDark ? AppThemeData.greyDark300 : AppThemeData.grey300),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
@@ -379,13 +381,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'Rental Package'.tr,
'Rental Package'.tr(),
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
Text(
controller.order.value.rentalPackageModel!.name.toString().tr,
controller.order.value.rentalPackageModel!.name.toString().tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -398,13 +400,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'Rental Package Price'.tr,
'Rental Package Price'.tr(),
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
Text(
Constant.amountShow(amount: controller.order.value.rentalPackageModel!.baseFare.toString()).tr,
Constant.amountShow(amount: controller.order.value.rentalPackageModel!.baseFare.toString()).tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -417,13 +419,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'${'Including'.tr} ${Constant.distanceType.tr}',
'${'Including'.tr()} ${Constant.distanceType.tr()}',
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
Text(
"${controller.order.value.rentalPackageModel!.includedDistance.toString()} ${Constant.distanceType}".tr,
"${controller.order.value.rentalPackageModel!.includedDistance.toString()} ${Constant.distanceType}".tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -436,13 +438,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'Including Hours'.tr,
'Including Hours'.tr(),
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
Text(
"${controller.order.value.rentalPackageModel!.includedHours.toString()} ${'Hr'.tr}".tr,
"${controller.order.value.rentalPackageModel!.includedHours.toString()} ${'Hr'.tr()}".tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -455,7 +457,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'${'Extra'.tr} ${Constant.distanceType}',
'${'Extra'.tr()} ${Constant.distanceType}',
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -496,13 +498,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
'Extra Minutes'.tr,
'Extra Minutes'.tr(),
textAlign: TextAlign.start,
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
),
Text(
"${controller.order.value.endTime == null ? "0" : (((controller.order.value.endTime!.toDate().difference(controller.order.value.startTime!.toDate()).inMinutes) - (int.parse(controller.order.value.rentalPackageModel!.includedHours.toString()) * 60)).clamp(0, double.infinity).toInt().toString())} ${'Min'.tr}",
"${controller.order.value.endTime == null ? "0" : (((controller.order.value.endTime!.toDate().difference(controller.order.value.startTime!.toDate()).inMinutes) - (int.parse(controller.order.value.rentalPackageModel!.includedHours.toString()) * 60)).clamp(0, double.infinity).toInt().toString())} ${'Min'.tr()}",
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -524,11 +526,11 @@ class RentalOrderDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
Text("Order Summary".tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey500)),
const SizedBox(height: 8),
_summaryTile("Subtotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
_summaryTile("Discount".tr, Constant.amountShow(amount: controller.discount.value.toString()), isDark, AppThemeData.dangerDark300),
_summaryTile("Subtotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark, null),
_summaryTile("Discount".tr(), Constant.amountShow(amount: controller.discount.value.toString()), isDark, AppThemeData.dangerDark300),
...List.generate(controller.order.value.taxSetting?.length ?? 0, (index) {
final taxModel = controller.order.value.taxSetting![index];
@@ -542,7 +544,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
}),
const Divider(),
_summaryTile("Order Total".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
_summaryTile("Order Total".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark, null),
],
),
),
@@ -563,7 +565,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
if (controller.order.value.endKitoMetersReading == null ||
controller.order.value.endKitoMetersReading == "0.0" ||
controller.order.value.endKitoMetersReading!.isEmpty) {
ShowToastDialog.showToast("You are not able to pay now until driver adds kilometer".tr);
ShowToastDialog.showToast("You are not able to pay now until driver adds kilometer".tr());
} else {
Get.bottomSheet(paymentBottomSheet(context, controller, isDark, controller.order.value), isScrollControlled: true, backgroundColor: Colors.transparent);
}
@@ -626,7 +628,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Select Payment Method".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text("Select Payment Method".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
GestureDetector(
onTap: () {
Get.back();
@@ -641,7 +643,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
padding: EdgeInsets.zero,
controller: scrollController,
children: [
Text("Preferred Payment".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text("Preferred Payment".tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
Container(
@@ -672,7 +674,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
children: [
const SizedBox(height: 10),
Text(
"Other Payment Options".tr,
"Other Payment Options".tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
),
@@ -717,12 +719,12 @@ class RentalOrderDetailsScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: "Continue".tr,
title: "Continue".tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast("Please select a payment method".tr);
ShowToastDialog.showToast("Please select a payment method".tr());
} else {
if (controller.selectedPaymentMethod.value == PaymentGateway.stripe.name) {
controller.stripeMakePayment(amount: controller.totalAmount.value.toString());
@@ -740,7 +742,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
controller.completeOrder();
} else if (controller.selectedPaymentMethod.value == PaymentGateway.wallet.name) {
if (Constant.userModel!.walletAmount == null || Constant.userModel!.walletAmount! < controller.totalAmount.value) {
ShowToastDialog.showToast("You do not have sufficient wallet balance".tr);
ShowToastDialog.showToast("You do not have sufficient wallet balance".tr());
} else {
controller.completeOrder();
}
@@ -756,14 +758,14 @@ class RentalOrderDetailsScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse(controller.totalAmount.value.toString()), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.totalAmount.value.toString(), orderId: result.id);
}
});
} else {
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast("Please select payment method".tr());
}
}
},

View File

@@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:get/get.dart';
@@ -30,7 +31,7 @@ class RentalReviewScreen extends StatelessWidget {
child: Icon(Icons.arrow_back_ios, color: isDark ? Colors.white : Colors.black),
),
title: Text(
controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 16),
),
),
@@ -93,7 +94,7 @@ class RentalReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 16),
child: Text(
'How is your trip?'.tr,
'How is your trip?'.tr(),
style: TextStyle(
fontSize: 18,
color: isDark ? Colors.white : Colors.black,
@@ -105,7 +106,7 @@ class RentalReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
'Your feedback will help us improve \n driving experience better'.tr,
'Your feedback will help us improve \n driving experience better'.tr(),
textAlign: TextAlign.center,
style: TextStyle(
color: isDark ? Colors.white : Colors.black.withOpacity(0.60),
@@ -118,7 +119,7 @@ class RentalReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 20),
child: Text(
'Rate for'.tr,
'Rate for'.tr(),
style: TextStyle(
fontSize: 16,
color: isDark ? Colors.white : Colors.black.withOpacity(0.60),
@@ -156,7 +157,7 @@ class RentalReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(20.0),
child: TextFieldWidget(
hintText: "Type comment....".tr,
hintText: "Type comment....".tr(),
controller: controller.comment.value,
maxLine: 5,
),