Compare commits

..

1 Commits

41 changed files with 128 additions and 155 deletions

View File

@@ -152,19 +152,6 @@
"nonVeg": "Non Veg", "nonVeg": "Non Veg",
"favourites": "Favourites", "favourites": "Favourites",
"orders": "Orders", "orders": "Orders",
"takeAway": "TakeAway", "takeAway": "TakeAway"
"seeAll": "See All",
"bestServingFood": "Best Servings Food",
"outCategories": "Our Categories",
"saveUpTo50Perc": "Save Up to 50% Off",
"stories": "Stories",
"bestFoodStories": "Best Food Stories Ever",
"error": "Error",
"couldNotLaunch": "Could not launch",
"exploreCategories": "Explore the Categories",
"noStoreFound": "No Store Found in Your Area",
"currentlyNoAvailableStoreInZone": "Currently, there are no available store in your zone. Try changing your location to find nearby options.",
"dineInReservations": "Dine-In Reservations",
"bookATable": "Book a table at your favorite restaurant and enjoy a delightful dining experience."
} }

View File

@@ -152,34 +152,12 @@ class ConstTexts {
static String favourites = "favourites"; static String favourites = "favourites";
static String orders = "orders"; static String orders = "orders";
static String takeAway = "takeAway"; static String takeAway = "takeAway";
static String seeAll = "seeAll"; // static String allStores = "allStores";
static String bestServingFood = "bestServingFood"; // static String alert = "alert";
static String ourCategories = "outCategories"; // static String cancel = "cancel";
static String saveUpTo50Perc = "saveUpTo50Perc"; // static String ok = "ok";
static String error = "error"; // static String freeDelivery = "freeDelivery";
static String bestFoodStories = "bestFoodStories"; // static String upto = "upto";
static String doYouWantChangeTheDeliverOption = // static String doYouWantChangeTheDeliverOption = "doYouWantChangeTheDeliverOption";
"doYouWantChangeTheDeliverOption"; // static String cash = "cash";
static String stories = "stories";
static String couldNotLaunch = "couldNotLaunch";
static String exploreCategories = "exploreCategories";
static String changeZone = "Change Zone";
static String noStoreFound = "noStoreFound";
static String currentlyNoAvailableStoreInZone = "currentlyNoAvailableStoreInZone";
static String dineInReservations = "dineInReservations";
static String bookATable = "bookATable";
// static String orders = "orders";
// static String takeAway = "takeAway";
// static String seeAll = "seeAll";
// static String bestServingFood = "bestServingFood";
// static String ourCategories = "outCategories";
// static String saveUpTo50Perc = "saveUpTo50Perc";
// static String error = "error";
// static String bestFoodStories = "bestFoodStories";
// static String doYouWantChangeTheDeliverOption =
// "doYouWantChangeTheDeliverOption";
// static String stories = "stories";
// static String couldNotLaunch = "couldNotLaunch";
// static String exploreCategories = "exploreCategories";
// static String changeZone = "Change Zone";
} }

View File

@@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/utils/app_router.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;

View File

@@ -833,9 +833,8 @@ class IntercityHomeController extends GetxController {
Future<void> fetchGoogleRouteWithWaypoints() async { Future<void> fetchGoogleRouteWithWaypoints() async {
if (departureLatLong.value.latitude == 0.0 || if (departureLatLong.value.latitude == 0.0 ||
destinationLatLong.value.latitude == 0.0) { destinationLatLong.value.latitude == 0.0)
return; return;
}
final origin = final origin =
'${departureLatLong.value.latitude},${departureLatLong.value.longitude}'; '${departureLatLong.value.latitude},${departureLatLong.value.longitude}';

View File

@@ -824,9 +824,8 @@ class CabBookingController extends GetxController {
Future<void> fetchGoogleRouteWithWaypoints() async { Future<void> fetchGoogleRouteWithWaypoints() async {
if (departureLatLong.value.latitude == 0.0 || if (departureLatLong.value.latitude == 0.0 ||
destinationLatLong.value.latitude == 0.0) { destinationLatLong.value.latitude == 0.0)
return; return;
}
final origin = final origin =
'${departureLatLong.value.latitude},${departureLatLong.value.longitude}'; '${departureLatLong.value.latitude},${departureLatLong.value.longitude}';

View File

@@ -1,7 +1,6 @@
import 'dart:developer'; import 'dart:developer';
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dash_board_controller.dart'; import 'package:customer/controllers/dash_board_controller.dart';
import 'package:customer/models/advertisement_model.dart'; import 'package:customer/models/advertisement_model.dart';
@@ -34,7 +33,7 @@ class FoodHomeController extends GetxController {
RxBool isLoading = true.obs; RxBool isLoading = true.obs;
RxBool isListView = true.obs; RxBool isListView = true.obs;
RxBool isPopular = true.obs; RxBool isPopular = true.obs;
RxString selectedOrderTypeValue = "delivery".obs; RxString selectedOrderTypeValue = "Delivery".tr.obs;
Rx<PageController> pageController = Rx<PageController> pageController =
PageController(viewportFraction: 0.877).obs; PageController(viewportFraction: 0.877).obs;
@@ -71,7 +70,7 @@ class FoodHomeController extends GetxController {
getCartData(); getCartData();
selectedOrderTypeValue.value = Preferences.getString( selectedOrderTypeValue.value = Preferences.getString(
Preferences.foodDeliveryType, Preferences.foodDeliveryType,
defaultValue: "delivery", defaultValue: "Delivery",
); );
await getZone(); await getZone();
FireStoreUtils.getAllNearestRestaurant().listen((event) async { FireStoreUtils.getAllNearestRestaurant().listen((event) async {

View File

@@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -3,6 +3,7 @@ import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/models/coupon_model.dart'; import 'package:customer/models/coupon_model.dart';
import 'package:customer/models/user_model.dart'; import 'package:customer/models/user_model.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -1,5 +1,6 @@
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -5,6 +5,7 @@ import 'package:customer/models/coupon_model.dart';
import 'package:customer/models/rental_order_model.dart'; import 'package:customer/models/rental_order_model.dart';
import 'package:customer/service/fire_store_utils.dart'; import 'package:customer/service/fire_store_utils.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -13,6 +13,7 @@ import 'package:customer/models/currency_model.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:firebase_auth/firebase_auth.dart' as auth; import 'package:firebase_auth/firebase_auth.dart' as auth;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -1,6 +1,7 @@
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:customer/models/user_model.dart'; import 'package:customer/models/user_model.dart';
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -4,6 +4,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/models/user_model.dart'; import 'package:customer/models/user_model.dart';
import 'package:customer/screen_ui/maintenance_mode_screen/maintenance_mode_screen.dart'; import 'package:customer/screen_ui/maintenance_mode_screen/maintenance_mode_screen.dart';
import 'package:customer/screen_ui/service_home_screen/service_list_screen.dart'; import 'package:customer/screen_ui/service_home_screen/service_list_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/notification_service.dart'; import 'package:customer/utils/notification_service.dart';
import 'package:customer/utils/preferences.dart'; import 'package:customer/utils/preferences.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';

View File

@@ -1,4 +1,5 @@
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart'; import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -2,6 +2,7 @@ import 'package:country_code_picker/country_code_picker.dart';
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart'; import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart'; import 'package:customer/screen_ui/auth_screens/sign_up_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -1,6 +1,7 @@
import 'package:country_code_picker/country_code_picker.dart'; import 'package:country_code_picker/country_code_picker.dart';
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart'; import 'package:customer/screen_ui/location_enable_screens/location_permission_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -5,6 +5,7 @@ import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/models/banner_model.dart'; import 'package:customer/models/banner_model.dart';
import 'package:customer/screen_ui/auth_screens/login_screen.dart'; import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -6,6 +6,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/multi_vendor_service/wallet_screen/wallet_screen.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';

View File

@@ -1,4 +1,3 @@
import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dash_board_controller.dart'; import 'package:customer/controllers/dash_board_controller.dart';
import 'package:customer/controllers/dash_board_ecommarce_controller.dart'; import 'package:customer/controllers/dash_board_ecommarce_controller.dart';
@@ -53,28 +52,28 @@ class DashBoardEcommerceScreen extends StatelessWidget {
isDark, isDark,
index: 0, index: 0,
assetIcon: "assets/icons/ic_home.svg", assetIcon: "assets/icons/ic_home.svg",
label: ConstTexts.home.tr, label: 'Home'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 1, index: 1,
assetIcon: "assets/icons/ic_fav.svg", assetIcon: "assets/icons/ic_fav.svg",
label: ConstTexts.favourites.tr, label: 'Favourites'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 2, index: 2,
assetIcon: "assets/icons/ic_orders.svg", assetIcon: "assets/icons/ic_orders.svg",
label: ConstTexts.orders.tr, label: 'Orders'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 3, index: 3,
assetIcon: "assets/icons/ic_profile.svg", assetIcon: "assets/icons/ic_profile.svg",
label: ConstTexts.profile.tr, label: 'Profile'.tr,
controller: controller, controller: controller,
), ),
] ]
@@ -83,35 +82,35 @@ class DashBoardEcommerceScreen extends StatelessWidget {
isDark, isDark,
index: 0, index: 0,
assetIcon: "assets/icons/ic_home.svg", assetIcon: "assets/icons/ic_home.svg",
label: ConstTexts.home.tr, label: 'Home'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 1, index: 1,
assetIcon: "assets/icons/ic_fav.svg", assetIcon: "assets/icons/ic_fav.svg",
label: ConstTexts.favourites.tr, label: 'Favourites'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 2, index: 2,
assetIcon: "assets/icons/ic_wallet.svg", assetIcon: "assets/icons/ic_wallet.svg",
label: ConstTexts.wallet.tr, label: 'Wallet'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 3, index: 3,
assetIcon: "assets/icons/ic_orders.svg", assetIcon: "assets/icons/ic_orders.svg",
label: ConstTexts.orders.tr, label: 'Orders'.tr,
controller: controller, controller: controller,
), ),
navigationBarItem( navigationBarItem(
isDark, isDark,
index: 4, index: 4,
assetIcon: "assets/icons/ic_profile.svg", assetIcon: "assets/icons/ic_profile.svg",
label: ConstTexts.profile.tr, label: 'Profile'.tr,
controller: controller, controller: controller,
), ),
], ],

View File

@@ -7,6 +7,7 @@ import 'package:customer/screen_ui/service_home_screen/service_list_screen.dart'
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/widget/osm_map/map_picker_page.dart'; import 'package:customer/widget/osm_map/map_picker_page.dart';
import 'package:customer/widget/place_picker/location_picker_screen.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/place_picker/selected_location_model.dart';

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/screen_ui/ecommarce/dash_board_e_commerce_screen.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';

View File

@@ -1,6 +1,7 @@
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/change_language_controller.dart'; import 'package:customer/controllers/change_language_controller.dart';
import 'package:customer/screen_ui/splash_screen/splash_screen.dart';
import 'package:customer/service/localization_service.dart'; import 'package:customer/service/localization_service.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';

View File

@@ -1,5 +1,3 @@
// ignore_for_file: depend_on_referenced_packages
import 'package:customer/constant/const_texts.dart'; import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/dine_in_controller.dart'; import 'package:customer/controllers/dine_in_controller.dart';
@@ -12,7 +10,9 @@ import 'package:customer/screen_ui/multi_vendor_service/dine_in_screeen/view_all
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@@ -83,7 +83,7 @@ class DineInScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
ConstTexts.dineInReservations.tr, "Dine-In Reservations".tr,
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontFamily: AppThemeData.semiBold, fontFamily: AppThemeData.semiBold,
@@ -95,7 +95,8 @@ class DineInScreen extends StatelessWidget {
), ),
), ),
Text( Text(
ConstTexts.bookATable.tr, "Book a table at your favorite restaurant and enjoy a delightful dining experience."
.tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
@@ -133,7 +134,7 @@ class DineInScreen extends StatelessWidget {
), ),
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
ConstTexts.noStoreFound.tr, "No Store Found in Your Area".tr,
style: TextStyle( style: TextStyle(
color: color:
isDark isDark
@@ -145,7 +146,8 @@ class DineInScreen extends StatelessWidget {
), ),
const SizedBox(height: 5), const SizedBox(height: 5),
Text( Text(
ConstTexts.currentlyNoAvailableStoreInZone.tr, "Currently, there are no available store in your zone. Try changing your location to find nearby options."
.tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: color:
@@ -159,7 +161,7 @@ class DineInScreen extends StatelessWidget {
const SizedBox(height: 20), const SizedBox(height: 20),
RoundedButtonFill( RoundedButtonFill(
borderRadius: 10.r, borderRadius: 10.r,
title: ConstTexts.changeZone.tr, title: "Change Zone".tr,
width: 55, width: 55,
height: 5.5, height: 5.5,
color: AppThemeData.primary300, color: AppThemeData.primary300,
@@ -183,7 +185,7 @@ class DineInScreen extends StatelessWidget {
const SizedBox(height: 10), const SizedBox(height: 10),
titleView( titleView(
isDark, isDark,
ConstTexts.exploreCategories.tr, "Explore the Categories".tr,
() { () {
Get.to(const ViewAllCategoryDineInScreen()); Get.to(const ViewAllCategoryDineInScreen());
}, },
@@ -219,7 +221,7 @@ class DineInScreen extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts.newArrivals.tr, "New Arrivals".tr,
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
fontFamily: fontFamily:
@@ -240,13 +242,12 @@ class DineInScreen extends StatelessWidget {
"vendorList": "vendorList":
controller controller
.newArrivalRestaurantList, .newArrivalRestaurantList,
"title": "title": "New Arrival",
ConstTexts.newArrival.tr,
}, },
); );
}, },
child: Text( child: Text(
ConstTexts.viewAll.tr, "View all".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: fontFamily:
@@ -318,7 +319,7 @@ class DineInScreen extends StatelessWidget {
vertical: 10, vertical: 10,
), ),
child: Text( child: Text(
ConstTexts.popularStores.tr, "Popular Stores".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: fontFamily:
@@ -359,7 +360,7 @@ class DineInScreen extends StatelessWidget {
vertical: 10, vertical: 10,
), ),
child: Text( child: Text(
ConstTexts.allStores.tr, "All Stores".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: fontFamily:
@@ -427,7 +428,7 @@ class DineInScreen extends StatelessWidget {
onPress!(); onPress!();
}, },
child: Text( child: Text(
ConstTexts.viewAll.tr, "View all".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.regular, fontFamily: AppThemeData.regular,
@@ -494,7 +495,7 @@ class PopularRestaurant extends StatelessWidget {
begin: const Alignment(-0.00, -1.00), begin: const Alignment(-0.00, -1.00),
end: const Alignment(0, 1), end: const Alignment(0, 1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
const Color(0xFF111827), const Color(0xFF111827),
], ],
), ),
@@ -757,7 +758,7 @@ class AllRestaurant extends StatelessWidget {
begin: const Alignment(-0.00, -1.00), begin: const Alignment(-0.00, -1.00),
end: const Alignment(0, 1), end: const Alignment(0, 1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
const Color(0xFF111827), const Color(0xFF111827),
], ],
), ),
@@ -1019,7 +1020,7 @@ class NewArrival extends StatelessWidget {
begin: const Alignment(0.00, 1.00), begin: const Alignment(0.00, 1.00),
end: const Alignment(0, -1), end: const Alignment(0, -1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
AppThemeData.grey900, AppThemeData.grey900,
], ],
), ),
@@ -1326,7 +1327,7 @@ class BannerBottomView extends StatelessWidget {
if (await canLaunchUrl(uri)) { if (await canLaunchUrl(uri)) {
await launchUrl(uri); await launchUrl(uri);
} else { } else {
ShowToastDialog.showToast(ConstTexts.couldNotLaunch.tr); ShowToastDialog.showToast("Could not launch".tr);
} }
} }
}, },

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/app_them_data.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import '../../../controllers/theme_controller.dart'; import '../../../controllers/theme_controller.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';

View File

@@ -8,6 +8,7 @@ import 'package:customer/models/wallet_transaction_model.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/text_field_widget.dart'; import 'package:customer/themes/text_field_widget.dart';
import 'package:customer/utils/app_router.dart';
import '../../../controllers/theme_controller.dart'; import '../../../controllers/theme_controller.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -19,6 +19,7 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/custom_dialog_box.dart'; import 'package:customer/themes/custom_dialog_box.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/utils/preferences.dart'; import 'package:customer/utils/preferences.dart';
import 'package:customer/widget/osm_map/map_picker_page.dart'; import 'package:customer/widget/osm_map/map_picker_page.dart';
@@ -653,9 +654,7 @@ class HomeScreen extends StatelessWidget {
children: [ children: [
titleView( titleView(
isDark, isDark,
ConstTexts ConstTexts.largestDiscounts.tr,
.largestDiscounts
.tr,
() { () {
Get.to( Get.to(
const DiscountRestaurantListScreen(), const DiscountRestaurantListScreen(),
@@ -710,9 +709,7 @@ class HomeScreen extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts ConstTexts.newArrival.tr,
.newArrival
.tr,
textAlign: textAlign:
TextAlign TextAlign
.start, .start,
@@ -747,9 +744,7 @@ class HomeScreen extends StatelessWidget {
}); });
}, },
child: Text( child: Text(
ConstTexts ConstTexts.viewAll.tr,
.viewAll
.tr,
textAlign: textAlign:
TextAlign TextAlign
.center, .center,
@@ -830,8 +825,7 @@ class HomeScreen extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts ConstTexts.highlightsForU
.highlightsForU
.tr, .tr,
textAlign: textAlign:
TextAlign TextAlign
@@ -861,8 +855,7 @@ class HomeScreen extends StatelessWidget {
}); });
}, },
child: Text( child: Text(
ConstTexts ConstTexts.viewAll
.viewAll
.tr, .tr,
textAlign: textAlign:
TextAlign TextAlign
@@ -978,8 +971,7 @@ class HomeScreen extends StatelessWidget {
vertical: 10, vertical: 10,
), ),
child: Text( child: Text(
ConstTexts ConstTexts.popularStores
.popularStores
.tr, .tr,
textAlign: textAlign:
TextAlign TextAlign
@@ -1033,9 +1025,7 @@ class HomeScreen extends StatelessWidget {
vertical: 10, vertical: 10,
), ),
child: Text( child: Text(
ConstTexts ConstTexts.allStores.tr,
.allStores
.tr,
textAlign: textAlign:
TextAlign TextAlign
.center, .center,
@@ -1223,10 +1213,12 @@ class HomeScreen extends StatelessWidget {
isDark isDark
? AppThemeData.greyDark100 ? AppThemeData.greyDark100
: AppThemeData.grey100, : AppThemeData.grey100,
value: controller.selectedOrderTypeValue.value, value: controller.selectedOrderTypeValue.value.tr,
icon: const Icon(Icons.keyboard_arrow_down), icon: const Icon(Icons.keyboard_arrow_down),
items: items:
["delivery", "takeaway"].map((String value) { <String>[ConstTexts.delivery.tr, ConstTexts.takeAway.tr].map((
String value,
) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value, value: value,
child: Text( child: Text(
@@ -1256,10 +1248,9 @@ class HomeScreen extends StatelessWidget {
builder: (BuildContext context) { builder: (BuildContext context) {
return CustomDialogBox( return CustomDialogBox(
title: ConstTexts.alert.tr, title: ConstTexts.alert.tr,
descriptions: descriptions:"",
ConstTexts // ConstTexts.doYouWantChangeTheDeliverOption
.doYouWantChangeTheDeliverOption // .tr,
.tr,
positiveString: ConstTexts.ok.tr, positiveString: ConstTexts.ok.tr,
negativeString: ConstTexts.cancel.tr, negativeString: ConstTexts.cancel.tr,
positiveClick: () async { positiveClick: () async {
@@ -1388,7 +1379,7 @@ class PopularRestaurant extends StatelessWidget {
begin: const Alignment(-0.00, -1.00), begin: const Alignment(-0.00, -1.00),
end: const Alignment(0, 1), end: const Alignment(0, 1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
const Color(0xFF111827), const Color(0xFF111827),
], ],
), ),
@@ -1995,7 +1986,7 @@ class NewArrival extends StatelessWidget {
begin: const Alignment(0.00, 1.00), begin: const Alignment(0.00, 1.00),
end: const Alignment(0, -1), end: const Alignment(0, -1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
AppThemeData.grey900, AppThemeData.grey900,
], ],
), ),
@@ -2090,7 +2081,7 @@ class NewArrival extends StatelessWidget {
), ),
const SizedBox(width: 4), const SizedBox(width: 4),
Text( Text(
ConstTexts.freeDelivery.tr, ConstTexts.freeDelivery.tr,
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
@@ -2218,7 +2209,7 @@ class AdvertisementHomeCard extends StatelessWidget {
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(16),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withValues(alpha: 0.1), color: Colors.black.withOpacity(0.1),
blurRadius: isDark ? 6 : 2, blurRadius: isDark ? 6 : 2,
spreadRadius: 0, spreadRadius: 0,
offset: Offset(0, isDark ? 3 : 1), offset: Offset(0, isDark ? 3 : 1),
@@ -2695,7 +2686,7 @@ class BannerView extends StatelessWidget {
if (await canLaunchUrl(uri)) { if (await canLaunchUrl(uri)) {
await launchUrl(uri); await launchUrl(uri);
} else { } else {
ShowToastDialog.showToast(ConstTexts.couldNotLaunch.tr); ShowToastDialog.showToast("Could not launch".tr);
} }
} }
}, },
@@ -2967,7 +2958,7 @@ class StoryView extends StatelessWidget {
height: Responsive.height(100, context), height: Responsive.height(100, context),
width: Responsive.width(100, context), width: Responsive.width(100, context),
), ),
Container(color: Colors.black.withValues(alpha: 0.30)), Container(color: Colors.black.withOpacity(0.30)),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 5, horizontal: 5,
@@ -2985,7 +2976,7 @@ class StoryView extends StatelessWidget {
if (snapshot.hasError) { if (snapshot.hasError) {
return Center( return Center(
child: Text( child: Text(
'${ConstTexts.error.tr}: ${snapshot.error}', '${"Error".tr}: ${snapshot.error}',
), ),
); );
} else if (snapshot.data == null) { } else if (snapshot.data == null) {
@@ -3277,9 +3268,7 @@ class MapView extends StatelessWidget {
), ),
colors: [ colors: [
Colors.black Colors.black
.withValues( .withValues(alpha: 0),
alpha: 0,
),
const Color( const Color(
0xFF111827, 0xFF111827,
), ),
@@ -3414,8 +3403,7 @@ class MapView extends StatelessWidget {
width: 5, width: 5,
), ),
Text( Text(
ConstTexts ConstTexts.freeDelivery
.freeDelivery
.tr, .tr,
style: TextStyle( style: TextStyle(
fontSize: fontSize:

View File

@@ -19,6 +19,7 @@ import 'package:customer/themes/custom_dialog_box.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/text_field_widget.dart'; import 'package:customer/themes/text_field_widget.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/utils/preferences.dart'; import 'package:customer/utils/preferences.dart';
import 'package:customer/widget/osm_map/map_picker_page.dart'; import 'package:customer/widget/osm_map/map_picker_page.dart';
@@ -787,10 +788,12 @@ class HomeScreenTwo extends StatelessWidget {
DropdownButton<String>( DropdownButton<String>(
isDense: false, isDense: false,
underline: const SizedBox(), underline: const SizedBox(),
value: controller.selectedOrderTypeValue.value, value: controller.selectedOrderTypeValue.value.tr,
icon: const Icon(Icons.keyboard_arrow_down), icon: const Icon(Icons.keyboard_arrow_down),
items: items:
["delivery", "takeaway"].map((String value) { <String>['Delivery'.tr, 'TakeAway'.tr].map((
String value,
) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value, value: value,
child: Text( child: Text(
@@ -819,11 +822,12 @@ class HomeScreenTwo extends StatelessWidget {
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
return CustomDialogBox( return CustomDialogBox(
title: ConstTexts.alert.tr, title: "Alert".tr,
descriptions: descriptions:
ConstTexts.doYouWantChangeTheDeliverOption.tr, "Do you really want to change the delivery option? Your cart will be empty."
positiveString: ConstTexts.ok.tr, .tr,
negativeString: ConstTexts.cancel.tr, positiveString: "Ok".tr,
negativeString: "Cancel".tr,
positiveClick: () async { positiveClick: () async {
await Preferences.setString( await Preferences.setString(
Preferences.foodDeliveryType, Preferences.foodDeliveryType,
@@ -885,7 +889,7 @@ class CategoryView extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts.ourCategories.tr, "Our Categories".tr,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.semiBold, fontFamily: AppThemeData.semiBold,
color: color:
@@ -901,7 +905,7 @@ class CategoryView extends StatelessWidget {
Get.to(const ViewAllCategoryScreen()); Get.to(const ViewAllCategoryScreen());
}, },
child: Text( child: Text(
ConstTexts.seeAll.tr, "See all".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.medium, fontFamily: AppThemeData.medium,
@@ -916,7 +920,7 @@ class CategoryView extends StatelessWidget {
], ],
), ),
GradientText( GradientText(
ConstTexts.bestServingFood.tr, 'Best Servings Food'.tr,
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontFamily: 'Inter Tight', fontFamily: 'Inter Tight',
@@ -1020,7 +1024,7 @@ class OfferView extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts.largestDiscounts.tr, "Large Discounts".tr,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.semiBold, fontFamily: AppThemeData.semiBold,
color: color:
@@ -1043,7 +1047,7 @@ class OfferView extends StatelessWidget {
); );
}, },
child: Text( child: Text(
ConstTexts.seeAll.tr, "See all".tr,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.medium, fontFamily: AppThemeData.medium,
@@ -1058,7 +1062,7 @@ class OfferView extends StatelessWidget {
], ],
), ),
GradientText( GradientText(
ConstTexts.saveUpTo50Perc.tr, 'Save Upto 50% Off'.tr,
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontFamily: 'Inter Tight', fontFamily: 'Inter Tight',
@@ -1116,7 +1120,7 @@ class OfferView extends StatelessWidget {
begin: const Alignment(-0.00, -1.00), begin: const Alignment(-0.00, -1.00),
end: const Alignment(0, 1), end: const Alignment(0, 1),
colors: [ colors: [
Colors.black.withValues(alpha: 0), Colors.black.withOpacity(0),
AppThemeData.grey900, AppThemeData.grey900,
], ],
), ),
@@ -1286,7 +1290,7 @@ class StoryView extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
ConstTexts.stories.tr, "Stories".tr,
style: TextStyle( style: TextStyle(
fontFamily: AppThemeData.semiBold, fontFamily: AppThemeData.semiBold,
color: color:
@@ -1300,7 +1304,7 @@ class StoryView extends StatelessWidget {
], ],
), ),
GradientText( GradientText(
ConstTexts.bestFoodStories.tr, 'Best Food Stories Ever'.tr,
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontFamily: 'Inter Tight', fontFamily: 'Inter Tight',
@@ -1350,7 +1354,7 @@ class StoryView extends StatelessWidget {
height: Responsive.height(100, context), height: Responsive.height(100, context),
width: Responsive.width(100, context), width: Responsive.width(100, context),
), ),
Container(color: Colors.black.withValues(alpha: 0.30)), Container(color: Colors.black.withOpacity(0.30)),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 5, horizontal: 5,
@@ -1368,7 +1372,7 @@ class StoryView extends StatelessWidget {
if (snapshot.hasError) { if (snapshot.hasError) {
return Center( return Center(
child: Text( child: Text(
'${ConstTexts.error.tr}: ${snapshot.error}', '${"Error".tr}: ${snapshot.error}',
), ),
); );
} else if (snapshot.data == null) { } else if (snapshot.data == null) {

View File

@@ -5,6 +5,7 @@ import 'package:customer/models/order_model.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -6,6 +6,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/app_them_data.dart';
import 'package:customer/themes/custom_dialog_box.dart'; import 'package:customer/themes/custom_dialog_box.dart';
import 'package:customer/themes/responsive.dart'; import 'package:customer/themes/responsive.dart';
import 'package:customer/utils/app_router.dart';
import 'package:in_app_review/in_app_review.dart'; import 'package:in_app_review/in_app_review.dart';
import '../../../controllers/theme_controller.dart'; import '../../../controllers/theme_controller.dart';

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/screen_ui/multi_vendor_service/wallet_screen/payment_list_screen.dart';
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import '../../../constant/collection_name.dart'; import '../../../constant/collection_name.dart';
import '../../../controllers/theme_controller.dart'; import '../../../controllers/theme_controller.dart';

View File

@@ -1,5 +1,6 @@
import 'package:customer/constant/assets.dart'; import 'package:customer/constant/assets.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -320,9 +320,8 @@ class FavouriteOndemandScreen extends StatelessWidget {
"", "",
), ),
builder: (ctx, snap) { builder: (ctx, snap) {
if (!snap.hasData) { if (!snap.hasData)
return const SizedBox(); return const SizedBox();
}
return Text( return Text(
snap.data?.title ?? snap.data?.title ??
"", "",
@@ -554,9 +553,8 @@ class FavouriteOndemandScreen extends StatelessWidget {
ctx, ctx,
snap, snap,
) { ) {
if (!snap.hasData) { if (!snap.hasData)
return const SizedBox(); return const SizedBox();
}
return Text( return Text(
snap snap
.data .data

View File

@@ -1,6 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/screen_ui/on_demand_service/provider_screen.dart'; import 'package:customer/screen_ui/on_demand_service/provider_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart';

View File

@@ -12,6 +12,7 @@ import 'package:customer/screen_ui/on_demand_service/view_category_service_scree
import 'package:customer/themes/app_them_data.dart'; import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart'; import 'package:customer/themes/show_toast_dialog.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/network_image_widget.dart';
import 'package:customer/widget/osm_map/map_picker_page.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/location_picker_screen.dart';

View File

@@ -1,6 +1,7 @@
import 'package:customer/screen_ui/auth_screens/login_screen.dart'; import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/screen_ui/parcel_service/parcel_order_details.dart'; import 'package:customer/screen_ui/parcel_service/parcel_order_details.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -1,4 +1,5 @@
import 'package:customer/screen_ui/parcel_service/parcel_dashboard_screen.dart'; import 'package:customer/screen_ui/parcel_service/parcel_dashboard_screen.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

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/multi_vendor_service/wallet_screen/wallet_screen.dart';
import 'package:customer/screen_ui/rental_service/rental_order_details_screen.dart'; import 'package:customer/screen_ui/rental_service/rental_order_details_screen.dart';
import 'package:customer/themes/round_button_fill.dart'; import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -1,5 +1,6 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/constant/constant.dart'; import 'package:customer/constant/constant.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -152,45 +152,36 @@ class Utils {
List<String> parts = []; List<String> parts = [];
if (selectedLocation.address!.name != null && if (selectedLocation.address!.name != null &&
selectedLocation.address!.name!.isNotEmpty) { selectedLocation.address!.name!.isNotEmpty)
parts.add(selectedLocation.address!.name!); parts.add(selectedLocation.address!.name!);
}
if (selectedLocation.address!.subThoroughfare != null && if (selectedLocation.address!.subThoroughfare != null &&
selectedLocation.address!.subThoroughfare!.isNotEmpty) { selectedLocation.address!.subThoroughfare!.isNotEmpty)
parts.add(selectedLocation.address!.subThoroughfare!); parts.add(selectedLocation.address!.subThoroughfare!);
}
if (selectedLocation.address!.thoroughfare != null && if (selectedLocation.address!.thoroughfare != null &&
selectedLocation.address!.thoroughfare!.isNotEmpty) { selectedLocation.address!.thoroughfare!.isNotEmpty)
parts.add(selectedLocation.address!.thoroughfare!); parts.add(selectedLocation.address!.thoroughfare!);
}
if (selectedLocation.address!.subLocality != null && if (selectedLocation.address!.subLocality != null &&
selectedLocation.address!.subLocality!.isNotEmpty) { selectedLocation.address!.subLocality!.isNotEmpty)
parts.add(selectedLocation.address!.subLocality!); parts.add(selectedLocation.address!.subLocality!);
}
if (selectedLocation.address!.locality != null && if (selectedLocation.address!.locality != null &&
selectedLocation.address!.locality!.isNotEmpty) { selectedLocation.address!.locality!.isNotEmpty)
parts.add(selectedLocation.address!.locality!); parts.add(selectedLocation.address!.locality!);
}
if (selectedLocation.address!.subAdministrativeArea != null && if (selectedLocation.address!.subAdministrativeArea != null &&
selectedLocation.address!.subAdministrativeArea!.isNotEmpty) { selectedLocation.address!.subAdministrativeArea!.isNotEmpty) {
parts.add(selectedLocation.address!.subAdministrativeArea!); parts.add(selectedLocation.address!.subAdministrativeArea!);
} }
if (selectedLocation.address!.administrativeArea != null && if (selectedLocation.address!.administrativeArea != null &&
selectedLocation.address!.administrativeArea!.isNotEmpty) { selectedLocation.address!.administrativeArea!.isNotEmpty)
parts.add(selectedLocation.address!.administrativeArea!); parts.add(selectedLocation.address!.administrativeArea!);
}
if (selectedLocation.address!.postalCode != null && if (selectedLocation.address!.postalCode != null &&
selectedLocation.address!.postalCode!.isNotEmpty) { selectedLocation.address!.postalCode!.isNotEmpty)
parts.add(selectedLocation.address!.postalCode!); parts.add(selectedLocation.address!.postalCode!);
}
if (selectedLocation.address!.country != null && if (selectedLocation.address!.country != null &&
selectedLocation.address!.country!.isNotEmpty) { selectedLocation.address!.country!.isNotEmpty)
parts.add(selectedLocation.address!.country!); parts.add(selectedLocation.address!.country!);
}
if (selectedLocation.address!.isoCountryCode != null && if (selectedLocation.address!.isoCountryCode != null &&
selectedLocation.address!.isoCountryCode!.isNotEmpty) { selectedLocation.address!.isoCountryCode!.isNotEmpty)
parts.add(selectedLocation.address!.isoCountryCode!); parts.add(selectedLocation.address!.isoCountryCode!);
}
return parts.join(', '); return parts.join(', ');
} }