BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -9,7 +9,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:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
|
||||
class AllBrandProductScreen extends StatelessWidget {
|
||||
const AllBrandProductScreen({super.key});
|
||||
@@ -22,23 +22,41 @@ class AllBrandProductScreen extends StatelessWidget {
|
||||
init: AllBrandProductController(),
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, centerTitle: false, titleSpacing: 0),
|
||||
appBar: AppBar(
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16,vertical: 20),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 20,
|
||||
),
|
||||
child: GridView.builder(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 3.5 / 6, crossAxisSpacing: 10),
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 3.5 / 6,
|
||||
crossAxisSpacing: 10,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: controller.productList.length,
|
||||
itemCount: controller.productList.length,
|
||||
itemBuilder: (context, index) {
|
||||
ProductModel productModel = controller.productList[index];
|
||||
ProductModel productModel =
|
||||
controller.productList[index];
|
||||
return FutureBuilder(
|
||||
future: FireStoreUtils.getVendorById(productModel.vendorID.toString()),
|
||||
future: FireStoreUtils.getVendorById(
|
||||
productModel.vendorID.toString(),
|
||||
),
|
||||
builder: (context, vendorSnapshot) {
|
||||
if (!vendorSnapshot.hasData || vendorSnapshot.connectionState == ConnectionState.waiting) {
|
||||
if (!vendorSnapshot.hasData ||
|
||||
vendorSnapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
return const SizedBox(); // Show placeholder or loader
|
||||
}
|
||||
VendorModel? vendorModel = vendorSnapshot.data;
|
||||
@@ -48,34 +66,78 @@ class AllBrandProductScreen extends StatelessWidget {
|
||||
List<String> selectedIndexVariants = [];
|
||||
List<String> selectedIndexArray = [];
|
||||
if (productModel.itemAttribute != null) {
|
||||
if (productModel.itemAttribute!.attributes!.isNotEmpty) {
|
||||
for (var element in productModel.itemAttribute!.attributes!) {
|
||||
if (productModel
|
||||
.itemAttribute!
|
||||
.attributes!
|
||||
.isNotEmpty) {
|
||||
for (var element
|
||||
in productModel
|
||||
.itemAttribute!
|
||||
.attributes!) {
|
||||
if (element.attributeOptions!.isNotEmpty) {
|
||||
selectedVariants.add(
|
||||
productModel.itemAttribute!.attributes![productModel.itemAttribute!.attributes!.indexOf(element)].attributeOptions![0].toString(),
|
||||
productModel
|
||||
.itemAttribute!
|
||||
.attributes![productModel
|
||||
.itemAttribute!
|
||||
.attributes!
|
||||
.indexOf(element)]
|
||||
.attributeOptions![0]
|
||||
.toString(),
|
||||
);
|
||||
selectedIndexVariants.add(
|
||||
'${productModel.itemAttribute!.attributes!.indexOf(element)} _${productModel.itemAttribute!.attributes![0].attributeOptions![0].toString()}',
|
||||
);
|
||||
selectedIndexArray.add('${productModel.itemAttribute!.attributes!.indexOf(element)}_0');
|
||||
selectedIndexArray.add(
|
||||
'${productModel.itemAttribute!.attributes!.indexOf(element)}_0',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (productModel.itemAttribute!.variants!.where((element) => element.variantSku == selectedVariants.join('-')).isNotEmpty) {
|
||||
if (productModel.itemAttribute!.variants!
|
||||
.where(
|
||||
(element) =>
|
||||
element.variantSku ==
|
||||
selectedVariants.join('-'),
|
||||
)
|
||||
.isNotEmpty) {
|
||||
price = Constant.productCommissionPrice(
|
||||
vendorModel!,
|
||||
productModel.itemAttribute!.variants!.where((element) => element.variantSku == selectedVariants.join('-')).first.variantPrice ?? '0',
|
||||
productModel.itemAttribute!.variants!
|
||||
.where(
|
||||
(element) =>
|
||||
element.variantSku ==
|
||||
selectedVariants.join('-'),
|
||||
)
|
||||
.first
|
||||
.variantPrice ??
|
||||
'0',
|
||||
);
|
||||
disPrice = "0";
|
||||
}
|
||||
} else {
|
||||
price = Constant.productCommissionPrice(vendorModel!, productModel.price.toString());
|
||||
disPrice = double.parse(productModel.disPrice.toString()) <= 0 ? "0" : Constant.productCommissionPrice(vendorModel, productModel.disPrice.toString());
|
||||
price = Constant.productCommissionPrice(
|
||||
vendorModel!,
|
||||
productModel.price.toString(),
|
||||
);
|
||||
disPrice =
|
||||
double.parse(
|
||||
productModel.disPrice.toString(),
|
||||
) <=
|
||||
0
|
||||
? "0"
|
||||
: Constant.productCommissionPrice(
|
||||
vendorModel,
|
||||
productModel.disPrice.toString(),
|
||||
);
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
Get.to(
|
||||
const RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -85,47 +147,108 @@ class AllBrandProductScreen extends StatelessWidget {
|
||||
child: SizedBox(
|
||||
height: 90,
|
||||
width: Responsive.width(100, context),
|
||||
child: NetworkImageWidget(imageUrl: productModel.photo.toString(), fit: BoxFit.cover),
|
||||
child: NetworkImageWidget(
|
||||
imageUrl: productModel.photo.toString(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
productModel.name!.capitalizeString(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark600 : AppThemeData.grey600),
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark600
|
||||
: AppThemeData.grey600,
|
||||
),
|
||||
),
|
||||
disPrice == "" || disPrice == "0"
|
||||
? Text(Constant.amountShow(amount: price), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.primary300))
|
||||
? Text(
|
||||
Constant.amountShow(amount: price),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
AppThemeData.primary300,
|
||||
),
|
||||
)
|
||||
: Row(
|
||||
children: [
|
||||
Text(
|
||||
Constant.amountShow(amount: price),
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: Colors.grey, decoration: TextDecoration.lineThrough),
|
||||
Constant.amountShow(
|
||||
amount: price,
|
||||
),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey,
|
||||
decoration:
|
||||
TextDecoration
|
||||
.lineThrough,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
Constant.amountShow(amount: disPrice),
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
Constant.amountShow(
|
||||
amount: disPrice,
|
||||
),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.greyDark900
|
||||
: AppThemeData
|
||||
.grey900,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(color: isDark ? AppThemeData.warning50 : AppThemeData.warning50, borderRadius: BorderRadius.circular(30)),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.warning50
|
||||
: AppThemeData.warning50,
|
||||
borderRadius: BorderRadius.circular(
|
||||
30,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.star, size: 18, color: AppThemeData.warning400),
|
||||
Icon(
|
||||
Icons.star,
|
||||
size: 18,
|
||||
color: AppThemeData.warning400,
|
||||
),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: productModel.reviewsCount.toString(), reviewSum: productModel.reviewsSum.toString())} (${productModel.reviewsSum})",
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: AppThemeData.warning400),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 12,
|
||||
color:
|
||||
AppThemeData
|
||||
.warning400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -9,7 +9,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:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
|
||||
class AllCategoryProductScreen extends StatelessWidget {
|
||||
const AllCategoryProductScreen({super.key});
|
||||
@@ -22,23 +22,41 @@ class AllCategoryProductScreen extends StatelessWidget {
|
||||
init: AllCategoryProductController(),
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, centerTitle: false, titleSpacing: 0),
|
||||
appBar: AppBar(
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 20,
|
||||
),
|
||||
child: GridView.builder(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 3.5 / 6, crossAxisSpacing: 10),
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 3.5 / 6,
|
||||
crossAxisSpacing: 10,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: controller.productList.length,
|
||||
itemBuilder: (context, index) {
|
||||
ProductModel productModel = controller.productList[index];
|
||||
ProductModel productModel =
|
||||
controller.productList[index];
|
||||
return FutureBuilder(
|
||||
future: FireStoreUtils.getVendorById(productModel.vendorID.toString()),
|
||||
future: FireStoreUtils.getVendorById(
|
||||
productModel.vendorID.toString(),
|
||||
),
|
||||
builder: (context, vendorSnapshot) {
|
||||
if (!vendorSnapshot.hasData || vendorSnapshot.connectionState == ConnectionState.waiting) {
|
||||
if (!vendorSnapshot.hasData ||
|
||||
vendorSnapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
return const SizedBox(); // Show placeholder or loader
|
||||
}
|
||||
VendorModel? vendorModel = vendorSnapshot.data;
|
||||
@@ -48,34 +66,78 @@ class AllCategoryProductScreen extends StatelessWidget {
|
||||
List<String> selectedIndexVariants = [];
|
||||
List<String> selectedIndexArray = [];
|
||||
if (productModel.itemAttribute != null) {
|
||||
if (productModel.itemAttribute!.attributes!.isNotEmpty) {
|
||||
for (var element in productModel.itemAttribute!.attributes!) {
|
||||
if (productModel
|
||||
.itemAttribute!
|
||||
.attributes!
|
||||
.isNotEmpty) {
|
||||
for (var element
|
||||
in productModel
|
||||
.itemAttribute!
|
||||
.attributes!) {
|
||||
if (element.attributeOptions!.isNotEmpty) {
|
||||
selectedVariants.add(
|
||||
productModel.itemAttribute!.attributes![productModel.itemAttribute!.attributes!.indexOf(element)].attributeOptions![0].toString(),
|
||||
productModel
|
||||
.itemAttribute!
|
||||
.attributes![productModel
|
||||
.itemAttribute!
|
||||
.attributes!
|
||||
.indexOf(element)]
|
||||
.attributeOptions![0]
|
||||
.toString(),
|
||||
);
|
||||
selectedIndexVariants.add(
|
||||
'${productModel.itemAttribute!.attributes!.indexOf(element)} _${productModel.itemAttribute!.attributes![0].attributeOptions![0].toString()}',
|
||||
);
|
||||
selectedIndexArray.add('${productModel.itemAttribute!.attributes!.indexOf(element)}_0');
|
||||
selectedIndexArray.add(
|
||||
'${productModel.itemAttribute!.attributes!.indexOf(element)}_0',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (productModel.itemAttribute!.variants!.where((element) => element.variantSku == selectedVariants.join('-')).isNotEmpty) {
|
||||
if (productModel.itemAttribute!.variants!
|
||||
.where(
|
||||
(element) =>
|
||||
element.variantSku ==
|
||||
selectedVariants.join('-'),
|
||||
)
|
||||
.isNotEmpty) {
|
||||
price = Constant.productCommissionPrice(
|
||||
vendorModel!,
|
||||
productModel.itemAttribute!.variants!.where((element) => element.variantSku == selectedVariants.join('-')).first.variantPrice ?? '0',
|
||||
productModel.itemAttribute!.variants!
|
||||
.where(
|
||||
(element) =>
|
||||
element.variantSku ==
|
||||
selectedVariants.join('-'),
|
||||
)
|
||||
.first
|
||||
.variantPrice ??
|
||||
'0',
|
||||
);
|
||||
disPrice = "0";
|
||||
}
|
||||
} else {
|
||||
price = Constant.productCommissionPrice(vendorModel!, productModel.price.toString());
|
||||
disPrice = double.parse(productModel.disPrice.toString()) <= 0 ? "0" : Constant.productCommissionPrice(vendorModel, productModel.disPrice.toString());
|
||||
price = Constant.productCommissionPrice(
|
||||
vendorModel!,
|
||||
productModel.price.toString(),
|
||||
);
|
||||
disPrice =
|
||||
double.parse(
|
||||
productModel.disPrice.toString(),
|
||||
) <=
|
||||
0
|
||||
? "0"
|
||||
: Constant.productCommissionPrice(
|
||||
vendorModel,
|
||||
productModel.disPrice.toString(),
|
||||
);
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
Get.to(
|
||||
const RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -85,47 +147,108 @@ class AllCategoryProductScreen extends StatelessWidget {
|
||||
child: SizedBox(
|
||||
height: 90,
|
||||
width: Responsive.width(100, context),
|
||||
child: NetworkImageWidget(imageUrl: productModel.photo.toString(), fit: BoxFit.cover),
|
||||
child: NetworkImageWidget(
|
||||
imageUrl: productModel.photo.toString(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
productModel.name!.capitalizeString(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark600 : AppThemeData.grey600),
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.greyDark600
|
||||
: AppThemeData.grey600,
|
||||
),
|
||||
),
|
||||
disPrice == "" || disPrice == "0"
|
||||
? Text(Constant.amountShow(amount: price), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.primary300))
|
||||
? Text(
|
||||
Constant.amountShow(amount: price),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
AppThemeData.primary300,
|
||||
),
|
||||
)
|
||||
: Row(
|
||||
children: [
|
||||
Text(
|
||||
Constant.amountShow(amount: price),
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: Colors.grey, decoration: TextDecoration.lineThrough),
|
||||
Constant.amountShow(
|
||||
amount: price,
|
||||
),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey,
|
||||
decoration:
|
||||
TextDecoration
|
||||
.lineThrough,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
Constant.amountShow(amount: disPrice),
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
Constant.amountShow(
|
||||
amount: disPrice,
|
||||
),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.greyDark900
|
||||
: AppThemeData
|
||||
.grey900,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(color: isDark ? AppThemeData.warning50 : AppThemeData.warning50, borderRadius: BorderRadius.circular(30)),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.warning50
|
||||
: AppThemeData.warning50,
|
||||
borderRadius: BorderRadius.circular(
|
||||
30,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.star, size: 18, color: AppThemeData.warning400),
|
||||
Icon(
|
||||
Icons.star,
|
||||
size: 18,
|
||||
color: AppThemeData.warning400,
|
||||
),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: productModel.reviewsCount.toString(), reviewSum: productModel.reviewsSum.toString())} (${productModel.reviewsSum})",
|
||||
style: AppThemeData.semiBoldTextStyle(fontSize: 12, color: AppThemeData.warning400),
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 12,
|
||||
color:
|
||||
AppThemeData
|
||||
.warning400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -5,8 +5,7 @@ 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';
|
||||
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../controllers/theme_controller.dart';
|
||||
|
||||
class DashBoardEcommerceScreen extends StatelessWidget {
|
||||
@@ -27,12 +26,19 @@ class DashBoardEcommerceScreen extends StatelessWidget {
|
||||
showUnselectedLabels: true,
|
||||
showSelectedLabels: true,
|
||||
selectedFontSize: 12,
|
||||
selectedLabelStyle: const TextStyle(fontFamily: AppThemeData.bold),
|
||||
unselectedLabelStyle: const TextStyle(fontFamily: AppThemeData.bold),
|
||||
selectedLabelStyle: const TextStyle(
|
||||
fontFamily: AppThemeData.bold,
|
||||
),
|
||||
unselectedLabelStyle: const TextStyle(
|
||||
fontFamily: AppThemeData.bold,
|
||||
),
|
||||
currentIndex: controller.selectedIndex.value,
|
||||
backgroundColor: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
selectedItemColor: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
unselectedItemColor: isDark ? AppThemeData.grey300 : AppThemeData.grey600,
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
selectedItemColor:
|
||||
isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
unselectedItemColor:
|
||||
isDark ? AppThemeData.grey300 : AppThemeData.grey600,
|
||||
onTap: (int index) {
|
||||
if (index == 0) {
|
||||
Get.put(DashBoardController());
|
||||
@@ -42,17 +48,71 @@ 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,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -61,7 +121,13 @@ class DashBoardEcommerceScreen extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
|
||||
BottomNavigationBarItem navigationBarItem(isDark, {required int index, required String label, required String assetIcon, required DashBoardEcommerceController controller}) {
|
||||
BottomNavigationBarItem navigationBarItem(
|
||||
isDark, {
|
||||
required int index,
|
||||
required String label,
|
||||
required String assetIcon,
|
||||
required DashBoardEcommerceController controller,
|
||||
}) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user