BASE: Implement Localization In Dashboard Screen & Home screen.
This commit is contained in:
@@ -139,6 +139,19 @@
|
|||||||
"ok": "Ok",
|
"ok": "Ok",
|
||||||
"doYouWantChangeTheDeliverOption": "Do you really want to change the delivery option? Your cart will be empty.",
|
"doYouWantChangeTheDeliverOption": "Do you really want to change the delivery option? Your cart will be empty.",
|
||||||
"freeDelivery": "Free Delivery",
|
"freeDelivery": "Free Delivery",
|
||||||
"upto": "Upto"
|
"upto": "Upto",
|
||||||
|
"viewCart": "View Cart",
|
||||||
|
"viewTimings": "View Timings",
|
||||||
|
"timingIsNotAdded": "Timing is not added by store",
|
||||||
|
"alsoApplicableOnTable": "Also applicable on table booking",
|
||||||
|
"tableBooking": "Table Booking",
|
||||||
|
"quickConformations": "Quick Conformations",
|
||||||
|
"menu": "Menu",
|
||||||
|
"searchAndMore": "Search the item and more...",
|
||||||
|
"veg": "Veg",
|
||||||
|
"nonVeg": "Non Veg",
|
||||||
|
"favourites": "Favourites",
|
||||||
|
"orders": "Orders",
|
||||||
|
"takeAway": "TakeAway"
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -139,6 +139,25 @@ class ConstTexts {
|
|||||||
static String ok = "ok";
|
static String ok = "ok";
|
||||||
static String freeDelivery = "freeDelivery";
|
static String freeDelivery = "freeDelivery";
|
||||||
static String upto = "upto";
|
static String upto = "upto";
|
||||||
|
static String viewCart = "viewCart";
|
||||||
|
static String viewTimings = "viewTimings";
|
||||||
|
static String timingIsNotAdded = "timingIsNotAdded";
|
||||||
|
static String alsoApplicableOnTable = "alsoApplicableOnTable";
|
||||||
|
static String tableBooking = "tableBooking";
|
||||||
|
static String quickConformations = "quickConformations";
|
||||||
|
static String menu = "menu";
|
||||||
|
static String searchAndMore = "searchAndMore";
|
||||||
|
static String veg = "veg";
|
||||||
|
static String nonVeg = "nonVeg";
|
||||||
|
static String favourites = "favourites";
|
||||||
|
static String orders = "orders";
|
||||||
|
static String takeAway = "takeAway";
|
||||||
|
static String allStores = "allStores";
|
||||||
|
static String alert = "alert";
|
||||||
|
static String cancel = "cancel";
|
||||||
|
static String ok = "ok";
|
||||||
|
static String freeDelivery = "freeDelivery";
|
||||||
|
static String upto = "upto";
|
||||||
static String doYouWantChangeTheDeliverOption = "doYouWantChangeTheDeliverOption";
|
static String doYouWantChangeTheDeliverOption = "doYouWantChangeTheDeliverOption";
|
||||||
static String cash = "cash";
|
static String cash = "cash";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
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/themes/app_them_data.dart';
|
import 'package:customer/themes/app_them_data.dart';
|
||||||
@@ -51,28 +52,28 @@ class DashBoardScreen extends StatelessWidget {
|
|||||||
isDark,
|
isDark,
|
||||||
index: 0,
|
index: 0,
|
||||||
assetIcon: "assets/icons/ic_home.svg",
|
assetIcon: "assets/icons/ic_home.svg",
|
||||||
label: 'Home'.tr,
|
label: ConstTexts.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: 'Favourites'.tr,
|
label: ConstTexts.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: 'Orders'.tr,
|
label: ConstTexts.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: 'Profile'.tr,
|
label: ConstTexts.profile.tr,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@@ -81,35 +82,35 @@ class DashBoardScreen extends StatelessWidget {
|
|||||||
isDark,
|
isDark,
|
||||||
index: 0,
|
index: 0,
|
||||||
assetIcon: "assets/icons/ic_home.svg",
|
assetIcon: "assets/icons/ic_home.svg",
|
||||||
label: 'Home'.tr,
|
label: ConstTexts.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: 'Favourites'.tr,
|
label: ConstTexts.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: 'Wallet'.tr,
|
label: ConstTexts.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: 'Orders'.tr,
|
label: ConstTexts.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: 'Profile'.tr,
|
label: ConstTexts.profile.tr,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1216,7 +1216,7 @@ class HomeScreen extends StatelessWidget {
|
|||||||
value: controller.selectedOrderTypeValue.value.tr,
|
value: controller.selectedOrderTypeValue.value.tr,
|
||||||
icon: const Icon(Icons.keyboard_arrow_down),
|
icon: const Icon(Icons.keyboard_arrow_down),
|
||||||
items:
|
items:
|
||||||
<String>['Delivery'.tr, 'TakeAway'.tr].map((
|
<String>[ConstTexts.delivery.tr, ConstTexts.takeAway.tr].map((
|
||||||
String value,
|
String value,
|
||||||
) {
|
) {
|
||||||
return DropdownMenuItem<String>(
|
return DropdownMenuItem<String>(
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'View Cart'.tr,
|
ConstTexts.viewCart.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: AppThemeData.semiBold,
|
fontFamily: AppThemeData.semiBold,
|
||||||
color: AppThemeData.grey50,
|
color: AppThemeData.grey50,
|
||||||
@@ -127,7 +127,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
Text(
|
Text(
|
||||||
"Free Delivery".tr,
|
ConstTexts.freeDelivery.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: AppThemeData.carRent600,
|
color: AppThemeData.carRent600,
|
||||||
@@ -257,7 +257,7 @@ class RestaurantDetailsScreen 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.withOpacity(0),
|
Colors.black.withValues(alpha: 0),
|
||||||
Colors.black,
|
Colors.black,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -291,7 +291,7 @@ class RestaurantDetailsScreen 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.withOpacity(0),
|
Colors.black.withValues(alpha: 0),
|
||||||
Colors.black,
|
Colors.black,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -549,7 +549,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
.workingHours!
|
.workingHours!
|
||||||
.isEmpty) {
|
.isEmpty) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Timing is not added by store"
|
ConstTexts.timingIsNotAdded
|
||||||
.tr,
|
.tr,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -560,7 +560,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"View Timings".tr,
|
ConstTexts.viewTimings.tr,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -602,7 +602,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Text(
|
Text(
|
||||||
"Also applicable on table booking"
|
ConstTexts.alsoApplicableOnTable
|
||||||
.tr,
|
.tr,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
@@ -676,7 +676,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
.start,
|
.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Table Booking".tr,
|
ConstTexts.tableBooking.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -694,7 +694,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Quick Conformations"
|
ConstTexts.quickConformations
|
||||||
.tr,
|
.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
@@ -753,7 +753,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Text(
|
Text(
|
||||||
"Menu".tr,
|
ConstTexts.menu.tr,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -773,7 +773,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
controller
|
controller
|
||||||
.searchEditingController
|
.searchEditingController
|
||||||
.value,
|
.value,
|
||||||
hintText: 'Search the item and more...'.tr,
|
hintText: ConstTexts.searchAndMore.tr,
|
||||||
onchange: (value) {
|
onchange: (value) {
|
||||||
controller.searchProduct(value);
|
controller.searchProduct(value);
|
||||||
},
|
},
|
||||||
@@ -867,7 +867,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
'Veg'.tr,
|
ConstTexts.veg.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
isDark
|
isDark
|
||||||
@@ -963,7 +963,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
'Non Veg'.tr,
|
ConstTexts.nonVeg.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
isDark
|
isDark
|
||||||
@@ -1578,8 +1578,8 @@ class ProductListView extends StatelessWidget {
|
|||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
Text(
|
Text(
|
||||||
productModel.nonveg == true
|
productModel.nonveg == true
|
||||||
? "Non Veg.".tr
|
? ConstTexts.nonVeg.tr
|
||||||
: "Pure veg.".tr,
|
: ConstTexts.veg.tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
productModel.nonveg == true
|
productModel.nonveg == true
|
||||||
|
|||||||
Reference in New Issue
Block a user