review issue fixed
This commit is contained in:
31
.dart_tool/extension_discovery/README.md
Normal file
31
.dart_tool/extension_discovery/README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Extension Discovery Cache
|
||||||
|
=========================
|
||||||
|
|
||||||
|
This folder is used by `package:extension_discovery` to cache lists of
|
||||||
|
packages that contains extensions for other packages.
|
||||||
|
|
||||||
|
DO NOT USE THIS FOLDER
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
* Do not read (or rely) the contents of this folder.
|
||||||
|
* Do write to this folder.
|
||||||
|
|
||||||
|
If you're interested in the lists of extensions stored in this folder use the
|
||||||
|
API offered by package `extension_discovery` to get this information.
|
||||||
|
|
||||||
|
If this package doesn't work for your use-case, then don't try to read the
|
||||||
|
contents of this folder. It may change, and will not remain stable.
|
||||||
|
|
||||||
|
Use package `extension_discovery`
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
If you want to access information from this folder.
|
||||||
|
|
||||||
|
Feel free to delete this folder
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Files in this folder act as a cache, and the cache is discarded if the files
|
||||||
|
are older than the modification time of `.dart_tool/package_config.json`.
|
||||||
|
|
||||||
|
Hence, it should never be necessary to clear this cache manually, if you find a
|
||||||
|
need to do please file a bug.
|
||||||
1
.dart_tool/extension_discovery/vs_code.json
Normal file
1
.dart_tool/extension_discovery/vs_code.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"version":2,"entries":[{"package":"grocery_app","rootUri":"../","packageUri":"lib/"}]}
|
||||||
@@ -1010,7 +1010,7 @@
|
|||||||
"languageVersion": "3.4"
|
"languageVersion": "3.4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"generated": "2025-03-22T13:23:26.634731Z",
|
"generated": "2025-03-24T12:39:30.338613Z",
|
||||||
"generator": "pub",
|
"generator": "pub",
|
||||||
"generatorVersion": "3.4.4",
|
"generatorVersion": "3.4.4",
|
||||||
"flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter",
|
"flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -38,9 +38,11 @@ class AppNetworkImage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CachedNetworkImage(
|
return
|
||||||
height: height,
|
CachedNetworkImage(
|
||||||
width: width,
|
|
||||||
|
/// height: height,
|
||||||
|
///width: width,
|
||||||
errorWidget: (context, url, error) {
|
errorWidget: (context, url, error) {
|
||||||
return Container(
|
return Container(
|
||||||
height: height,
|
height: height,
|
||||||
@@ -60,10 +62,8 @@ class AppNetworkImage extends StatelessWidget {
|
|||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
placeholder: (context, url)
|
placeholder: (context, url) {
|
||||||
{
|
return Container(
|
||||||
return
|
|
||||||
Container(
|
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -78,11 +78,10 @@ class AppNetworkImage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
imageBuilder: (context, cIMage) {
|
imageBuilder: (context, cIMage) {
|
||||||
return Container(
|
return Container(
|
||||||
width: width,
|
// width: width,
|
||||||
height: height,
|
height: 100,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: backGroundColor,
|
color: backGroundColor,
|
||||||
borderRadius: isFromSlider
|
borderRadius: isFromSlider
|
||||||
@@ -96,14 +95,21 @@ class AppNetworkImage extends StatelessWidget {
|
|||||||
bottomRight: Radius.circular(radius!),
|
bottomRight: Radius.circular(radius!),
|
||||||
)
|
)
|
||||||
: BorderRadius.circular(radius ?? 0),
|
: BorderRadius.circular(radius ?? 0),
|
||||||
border: Border.all(color: isBorderShow ? APPCOLOR.bgGrey : Colors.transparent, width: 1),
|
border: Border.all(
|
||||||
|
color: isBorderShow ? APPCOLOR.bgGrey : Colors.transparent,
|
||||||
|
width: 1),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: boxFit ?? BoxFit.contain,
|
fit: boxFit ?? BoxFit.fill,
|
||||||
colorFilter: isShowColor ? ColorFilter.mode(imageColor ?? APPCOLOR.bgGrey, BlendMode.srcIn) : null,
|
colorFilter: isShowColor
|
||||||
|
? ColorFilter.mode(
|
||||||
|
imageColor ?? APPCOLOR.bgGrey, BlendMode.srcIn)
|
||||||
|
: null,
|
||||||
image: cIMage,
|
image: cIMage,
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
imageUrl: imageUrl);
|
imageUrl: imageUrl);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,28 +78,34 @@ class OrderProvider extends ChangeNotifier {
|
|||||||
String productId,
|
String productId,
|
||||||
) async {
|
) async {
|
||||||
context.showLoader(show: true);
|
context.showLoader(show: true);
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = await _orderRepo.productReview(data, productId);
|
var result = await _orderRepo.productReview(data, productId);
|
||||||
|
|
||||||
return result.fold(
|
return result.fold(
|
||||||
(error)
|
(error) {
|
||||||
{
|
|
||||||
context.showLoader(show: false);
|
context.showLoader(show: false);
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: error.message,
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 14.0,
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
(response)
|
(response) {
|
||||||
{
|
|
||||||
context.showLoader(show: false);
|
context.showLoader(show: false);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} catch (e)
|
} catch (e) {
|
||||||
{
|
|
||||||
context.showLoader(show: false);
|
context.showLoader(show: false);
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: "Something went wrong",
|
msg: "Something went wrong ",
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
gravity: ToastGravity.BOTTOM,
|
gravity: ToastGravity.BOTTOM,
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
|
|||||||
@@ -133,8 +133,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget floatingAction() {
|
Widget floatingAction() {
|
||||||
return Consumer<ProductProvider>(builder: (context, provider, child)
|
return Consumer<ProductProvider>(builder: (context, provider, child) {
|
||||||
{
|
|
||||||
if (provider.countList.isEmpty) {
|
if (provider.countList.isEmpty) {
|
||||||
return Center();
|
return Center();
|
||||||
} else {
|
} else {
|
||||||
@@ -354,6 +353,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
.productImages?.first.url ??
|
.productImages?.first.url ??
|
||||||
"",
|
"",
|
||||||
backGroundColor: Colors.transparent,
|
backGroundColor: Colors.transparent,
|
||||||
|
radius: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@@ -361,7 +361,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 6, vertical: 2),
|
horizontal: 10, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -370,7 +370,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 12)),
|
color: Colors.white, fontSize: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -403,7 +403,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
Spacer(),
|
Spacer(),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.discountPrice ?? ""} ",
|
"₹${bestdealproduct.discountPrice ?? ""} ",
|
||||||
@@ -411,7 +411,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style:
|
style:
|
||||||
context.customSemiBold(Colors.black, 12),
|
context.customSemiBold(Colors.black, 15),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.basePrice ?? ""}",
|
"₹${bestdealproduct.basePrice ?? ""}",
|
||||||
@@ -421,7 +421,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
|||||||
style: context
|
style: context
|
||||||
.customMedium(
|
.customMedium(
|
||||||
Colors.grey.withOpacity(0.8),
|
Colors.grey.withOpacity(0.8),
|
||||||
12,
|
15,
|
||||||
)
|
)
|
||||||
.copyWith(
|
.copyWith(
|
||||||
decoration: TextDecoration.lineThrough,
|
decoration: TextDecoration.lineThrough,
|
||||||
|
|||||||
@@ -156,20 +156,21 @@ class _MycartState extends State<Mycart> {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
AppNetworkImage(
|
AppNetworkImage(
|
||||||
height: MediaQuery.of(context).size.height *
|
height:
|
||||||
0.08,
|
MediaQuery.of(context).size.height *
|
||||||
width: cardWidth * 0.7,
|
0.08,
|
||||||
imageUrl: bestdealproduct
|
width: cardWidth * 0.7,
|
||||||
.productImages?.first?.url ??
|
imageUrl: bestdealproduct
|
||||||
"",
|
.productImages?.first?.url ??
|
||||||
backGroundColor: Colors.transparent,
|
"",
|
||||||
),
|
backGroundColor: Colors.transparent,
|
||||||
|
radius: 10),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 1,
|
right: 1,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 6, vertical: 2),
|
horizontal: 10, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
@@ -179,7 +180,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
"${calculateDiscountPercentage(double.parse(bestdealproduct!.basePrice), double.parse(bestdealproduct!.discountPrice))}% OFF",
|
"${calculateDiscountPercentage(double.parse(bestdealproduct!.basePrice), double.parse(bestdealproduct!.discountPrice))}% OFF",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12)),
|
fontSize: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -217,7 +218,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.discountPrice ?? ""} ",
|
"₹${bestdealproduct.discountPrice ?? ""} ",
|
||||||
@@ -225,7 +226,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: context.customSemiBold(
|
style: context.customSemiBold(
|
||||||
Colors.black, 12),
|
Colors.black, 15),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.basePrice ?? ""}",
|
"₹${bestdealproduct.basePrice ?? ""}",
|
||||||
@@ -234,7 +235,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
style: context
|
style: context
|
||||||
.customMedium(
|
.customMedium(
|
||||||
Colors.grey.withOpacity(0.8),
|
Colors.grey.withOpacity(0.8),
|
||||||
12,
|
15,
|
||||||
)
|
)
|
||||||
.copyWith(
|
.copyWith(
|
||||||
decoration:
|
decoration:
|
||||||
@@ -760,8 +761,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (provider.allitem == null)
|
} else if (provider.allitem == null) {
|
||||||
{
|
|
||||||
return Center(child: Text('🛒 Your Front Shop Cart is empty'));
|
return Center(child: Text('🛒 Your Front Shop Cart is empty'));
|
||||||
} else if (provider.allitem.items == null ||
|
} else if (provider.allitem.items == null ||
|
||||||
provider.allitem.items!.isEmpty) {
|
provider.allitem.items!.isEmpty) {
|
||||||
@@ -791,8 +791,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (provider.couponDataModel.data!.isNotEmpty)
|
if (provider.couponDataModel.data!.isNotEmpty) {
|
||||||
{
|
|
||||||
context.push(MyRoutes.COUPONSSCREEN,
|
context.push(MyRoutes.COUPONSSCREEN,
|
||||||
extra: provider.allitem.id);
|
extra: provider.allitem.id);
|
||||||
} else {
|
} else {
|
||||||
@@ -813,7 +812,7 @@ class _MycartState extends State<Mycart> {
|
|||||||
SummaryRow(
|
SummaryRow(
|
||||||
label: 'Item Total Price', value: '₹${provider.totalPrice}'),
|
label: 'Item Total Price', value: '₹${provider.totalPrice}'),
|
||||||
SummaryRow(label: 'Discount Price', value: "${provider.discount}"),
|
SummaryRow(label: 'Discount Price', value: "${provider.discount}"),
|
||||||
SummaryRow(label: 'Delivery Free', value: 'Free', isGreen: true),
|
// SummaryRow(label: 'Delivery Free', value: 'Free', isGreen: true),
|
||||||
Divider(
|
Divider(
|
||||||
thickness: 0.2,
|
thickness: 0.2,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
|||||||
.productDatumlastImageurl ??
|
.productDatumlastImageurl ??
|
||||||
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
||||||
backGroundColor: Colors.white,
|
backGroundColor: Colors.white,
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -215,6 +216,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
|||||||
backGroundColor: APPCOLOR.bgGrey,
|
backGroundColor: APPCOLOR.bgGrey,
|
||||||
height: 20,
|
height: 20,
|
||||||
width: 20,
|
width: 20,
|
||||||
|
radius: 10,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.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';
|
||||||
@@ -224,13 +225,14 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
|||||||
.productImages!.first.url ??
|
.productImages!.first.url ??
|
||||||
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
||||||
backGroundColor: Colors.transparent,
|
backGroundColor: Colors.transparent,
|
||||||
|
radius: 10,
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 1,
|
right: 1,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 6, vertical: 2),
|
horizontal: 10, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
@@ -241,7 +243,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
|||||||
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}% OFF",
|
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}% OFF",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12)),
|
fontSize: 15)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -347,7 +349,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: context.customSemiBold(
|
style: context.customSemiBold(
|
||||||
Colors.black, 16),
|
Colors.black, 15),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
Text(
|
Text(
|
||||||
@@ -358,7 +360,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
|||||||
style: context
|
style: context
|
||||||
.customMedium(
|
.customMedium(
|
||||||
Colors.grey.withOpacity(0.8),
|
Colors.grey.withOpacity(0.8),
|
||||||
16,
|
15,
|
||||||
)
|
)
|
||||||
.copyWith(
|
.copyWith(
|
||||||
decoration:
|
decoration:
|
||||||
@@ -529,65 +531,198 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
|||||||
if (category.name == "ALL") ...{
|
if (category.name == "ALL") ...{
|
||||||
if (provider.categoriesss.isNotEmpty)
|
if (provider.categoriesss.isNotEmpty)
|
||||||
PopupMenuButton<ProductCategoryModel>(
|
PopupMenuButton<ProductCategoryModel>(
|
||||||
onSelected: (ProductCategoryModel value) {
|
onSelected: (ProductCategoryModel value) {
|
||||||
activeIndexProvider.setActiveIndex(0);
|
activeIndexProvider.setActiveIndex(0);
|
||||||
|
|
||||||
if (value.id == "all") {
|
if (value.id == "all") {
|
||||||
provider.iscroll = true;
|
provider.iscroll = true;
|
||||||
provider.products.clear();
|
provider.products.clear();
|
||||||
provider.isLoadingg = false;
|
provider.isLoadingg = false;
|
||||||
provider.hasMore = true;
|
provider.hasMore = true;
|
||||||
provider.page = 1;
|
provider.page = 1;
|
||||||
provider.gettAllProduct(
|
provider.gettAllProduct(
|
||||||
context, "", true, '');
|
context, "", true, '');
|
||||||
provider.getAllcategory(context);
|
provider.getAllcategory(context);
|
||||||
} else {
|
} else {
|
||||||
provider.categoryList.clear();
|
provider.categoryList.clear();
|
||||||
provider.getSubcategory(
|
provider.getSubcategory(
|
||||||
context, value.id);
|
context, value.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
provider.setSelectedCategory(value);
|
||||||
|
},
|
||||||
|
itemBuilder: (BuildContext context) =>
|
||||||
|
provider.categoriesss
|
||||||
|
.map(
|
||||||
|
(category) => PopupMenuItem(
|
||||||
|
value: category,
|
||||||
|
child: Text(
|
||||||
|
category.name ?? "Unknown"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
child: Center(
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
|
||||||
|
/// height: height,
|
||||||
|
///width: width,
|
||||||
|
errorWidget: (context, url, error) {
|
||||||
|
return Container(
|
||||||
|
height: 50,
|
||||||
|
width: 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1,
|
||||||
|
)),
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
|
APPASSETS.placeHolder,
|
||||||
|
height: 50 * 0.4,
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
placeholder: (context, url) {
|
||||||
|
return Container(
|
||||||
|
height: 50,
|
||||||
|
width: 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
width: 1,
|
||||||
|
)),
|
||||||
|
child: const Center(
|
||||||
|
child:
|
||||||
|
CupertinoActivityIndicator(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
imageBuilder: (context, cIMage) {
|
||||||
|
return Container(
|
||||||
|
width: 60,
|
||||||
|
height: 70,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.only(
|
||||||
|
topLeft:
|
||||||
|
Radius.circular(5!),
|
||||||
|
topRight:
|
||||||
|
Radius.circular(5!),
|
||||||
|
),
|
||||||
|
border: Border.all(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
width: 1),
|
||||||
|
image: DecorationImage(
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
image: cIMage,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
imageUrl: provider
|
||||||
|
.selectedCategory?.image ??
|
||||||
|
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png'),
|
||||||
|
)
|
||||||
|
|
||||||
|
// Container(
|
||||||
|
// child: AppNetworkImage(
|
||||||
|
// height: 50,
|
||||||
|
// width: 60,
|
||||||
|
// imageUrl: provider
|
||||||
|
// .selectedCategory?.image ??
|
||||||
|
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
||||||
|
// backGroundColor: APPCOLOR.bgGrey,
|
||||||
|
// radius: 10,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
provider.setSelectedCategory(value);
|
|
||||||
},
|
|
||||||
itemBuilder: (BuildContext context) =>
|
|
||||||
provider.categoriesss
|
|
||||||
.map(
|
|
||||||
(category) => PopupMenuItem(
|
|
||||||
value: category,
|
|
||||||
child: Text(
|
|
||||||
category.name ?? "Unknown"),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
|
||||||
child: Center(
|
|
||||||
child: Container(
|
|
||||||
child: AppNetworkImage(
|
|
||||||
height: 50,
|
|
||||||
width: 60,
|
|
||||||
imageUrl: provider
|
|
||||||
.selectedCategory?.image ??
|
|
||||||
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
|
||||||
backGroundColor: APPCOLOR.bgGrey,
|
|
||||||
radius: 10,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
} else ...{
|
} else ...{
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Center(
|
// Center(
|
||||||
child: Container(
|
// child: Container(
|
||||||
child: AppNetworkImage(
|
// child: AppNetworkImage(
|
||||||
height: 50,
|
// height: 50,
|
||||||
width: 50,
|
// width: 50,
|
||||||
imageUrl: category.image ??
|
// imageUrl: category.image ??
|
||||||
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
||||||
backGroundColor: APPCOLOR.bgGrey,
|
// backGroundColor: APPCOLOR.bgGrey,
|
||||||
radius: 10,
|
// radius: 10,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
|
|
||||||
|
CachedNetworkImage(
|
||||||
|
|
||||||
|
/// height: height,
|
||||||
|
///width: width,
|
||||||
|
errorWidget: (context, url, error) {
|
||||||
|
return Container(
|
||||||
|
// height: 50,
|
||||||
|
// width: 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1,
|
||||||
|
)),
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
|
APPASSETS.placeHolder,
|
||||||
|
height: 50 * 0.4,
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
placeholder: (context, url) {
|
||||||
|
return Container(
|
||||||
|
height: 50,
|
||||||
|
width: 50,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
width: 1,
|
||||||
|
)),
|
||||||
|
child: const Center(
|
||||||
|
child: CupertinoActivityIndicator(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
imageBuilder: (context, cIMage) {
|
||||||
|
return Container(
|
||||||
|
width: 60,
|
||||||
|
height: 70,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(5!),
|
||||||
|
topRight: Radius.circular(5!),
|
||||||
|
),
|
||||||
|
border: Border.all(
|
||||||
|
color: APPCOLOR.bgGrey,
|
||||||
|
width: 1),
|
||||||
|
image: DecorationImage(
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
image: cIMage,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
imageUrl: category.image),
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -522,6 +522,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
?.first
|
?.first
|
||||||
?.url ??
|
?.url ??
|
||||||
"",
|
"",
|
||||||
|
radius: 10,
|
||||||
backGroundColor: Colors.transparent,
|
backGroundColor: Colors.transparent,
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
@@ -529,7 +530,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 6, vertical: 2),
|
horizontal: 10, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
@@ -540,7 +541,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 12)),
|
fontWeight:
|
||||||
|
FontWeight.bold,
|
||||||
|
fontSize: 18)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -579,7 +582,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.discountPrice ?? ""} ",
|
"₹${bestdealproduct.discountPrice ?? ""} ",
|
||||||
@@ -587,7 +590,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: context.customSemiBold(
|
style: context.customSemiBold(
|
||||||
Colors.black, 11),
|
Colors.black, 15),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.basePrice ?? ""}",
|
"₹${bestdealproduct.basePrice ?? ""}",
|
||||||
@@ -598,7 +601,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
.customMedium(
|
.customMedium(
|
||||||
Colors.grey
|
Colors.grey
|
||||||
.withOpacity(0.8),
|
.withOpacity(0.8),
|
||||||
12)
|
15)
|
||||||
.copyWith(
|
.copyWith(
|
||||||
decoration: TextDecoration
|
decoration: TextDecoration
|
||||||
.lineThrough),
|
.lineThrough),
|
||||||
|
|||||||
@@ -285,34 +285,34 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (orderitem.orderItemStatus == "DELIVERED")
|
if (orderitem.orderItemStatus == "DELIVERED")
|
||||||
RichText(
|
RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: " ",
|
text: " ",
|
||||||
style: context.buttonTestStyle.copyWith(
|
style: context.buttonTestStyle.copyWith(
|
||||||
color: context.appColor.blackColor,
|
color: context.appColor.blackColor,
|
||||||
),
|
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: "Give Feedback",
|
|
||||||
style: context.buttonTestStyle.copyWith(
|
|
||||||
color: Colors.blue,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
),
|
|
||||||
recognizer: TapGestureRecognizer()..onTap = () {
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (context) =>
|
|
||||||
RatingScreen(orderId: orderitem.productId),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Give Feedback",
|
||||||
|
style: context.buttonTestStyle.copyWith(
|
||||||
|
color: Colors.blue,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => RatingScreen(
|
||||||
|
orderId: orderitem.productId),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
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';
|
||||||
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:grocery_app/src/logic/provider/order_provider.dart';
|
import 'package:grocery_app/src/logic/provider/order_provider.dart';
|
||||||
import 'package:grocery_app/utils/constants/color_constant.dart';
|
import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||||
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||||
@@ -96,23 +97,53 @@ class _RatingScreenState extends State<RatingScreen> {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final ratingData = {
|
if (_rating == 0.0) {
|
||||||
"rating": _rating,
|
Fluttertoast.showToast(
|
||||||
"title": _titleController.text,
|
msg: "Please Give a rating atleast 1 star",
|
||||||
"description": _descriptionController.text,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
"imageUrls":
|
gravity: ToastGravity.BOTTOM,
|
||||||
_selectedImages.map((file) => file.path).toList(),
|
backgroundColor: Colors.red,
|
||||||
};
|
textColor: Colors.white,
|
||||||
var response = await provider.productReview(
|
fontSize: 14.0,
|
||||||
context, ratingData, widget.orderId);
|
|
||||||
if (response) {
|
|
||||||
Navigator.pop(context);
|
|
||||||
} else {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
SnackBar(
|
|
||||||
content: Text("failed to Give feedback"),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
} else if (_titleController.text.isEmpty) {
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Please review title",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 14.0,
|
||||||
|
);
|
||||||
|
} else if (_descriptionController.text.isEmpty) {
|
||||||
|
Fluttertoast.showToast(
|
||||||
|
msg: "Please review description",
|
||||||
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
|
gravity: ToastGravity.BOTTOM,
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
textColor: Colors.white,
|
||||||
|
fontSize: 14.0,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
final ratingData = {
|
||||||
|
"rating": _rating,
|
||||||
|
"title": _titleController.text,
|
||||||
|
"description": _descriptionController.text,
|
||||||
|
"imageUrls": _selectedImages
|
||||||
|
.map((file) => file.path)
|
||||||
|
.toList(),
|
||||||
|
};
|
||||||
|
var response = await provider.productReview(
|
||||||
|
context, ratingData, widget.orderId);
|
||||||
|
if (response) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
} else {
|
||||||
|
// ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
// SnackBar(
|
||||||
|
// content: Text("failed to Give feedback"),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (_formKey.currentState?.validate() ?? false) {
|
// if (_formKey.currentState?.validate() ?? false) {
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
width: 2000,
|
width: 2000,
|
||||||
imageUrl: productImage.url,
|
imageUrl: productImage.url,
|
||||||
backGroundColor: Colors.transparent,
|
backGroundColor: Colors.transparent,
|
||||||
|
radius: 10,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Image.network(productImage.url ??
|
// Image.network(productImage.url ??
|
||||||
@@ -800,135 +801,136 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Padding(
|
: SizedBox.shrink();
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
// Padding(
|
||||||
child: Column(
|
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// child: Column(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text("Reviews & Ratings",
|
// children: [
|
||||||
style: TextStyle(
|
// Text("Reviews & Ratings",
|
||||||
fontSize: 20, fontWeight: FontWeight.bold)),
|
// style: TextStyle(
|
||||||
SizedBox(height: 10),
|
// fontSize: 20, fontWeight: FontWeight.bold)),
|
||||||
Row(
|
// SizedBox(height: 10),
|
||||||
children: [
|
// Row(
|
||||||
Text("4.2",
|
// children: [
|
||||||
style: TextStyle(
|
// Text("4.2",
|
||||||
fontSize: 30, fontWeight: FontWeight.bold)),
|
// style: TextStyle(
|
||||||
SizedBox(
|
// fontSize: 30, fontWeight: FontWeight.bold)),
|
||||||
width: 10,
|
// SizedBox(
|
||||||
),
|
// width: 10,
|
||||||
Column(
|
// ),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// Column(
|
||||||
children: [
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
RatingStars(
|
// children: [
|
||||||
value: value,
|
// RatingStars(
|
||||||
onValueChanged: (v) {
|
// value: value,
|
||||||
//
|
// onValueChanged: (v) {
|
||||||
},
|
// //
|
||||||
starBuilder: (index, color) => Icon(
|
// },
|
||||||
Icons.star,
|
// starBuilder: (index, color) => Icon(
|
||||||
color: color,
|
// Icons.star,
|
||||||
),
|
// color: color,
|
||||||
starCount: 5,
|
// ),
|
||||||
starSize: 20,
|
// starCount: 5,
|
||||||
valueLabelColor: const Color(0xff9b9b9b),
|
// starSize: 20,
|
||||||
valueLabelTextStyle: const TextStyle(
|
// valueLabelColor: const Color(0xff9b9b9b),
|
||||||
color: Colors.white,
|
// valueLabelTextStyle: const TextStyle(
|
||||||
fontWeight: FontWeight.w400,
|
// color: Colors.white,
|
||||||
fontStyle: FontStyle.normal,
|
// fontWeight: FontWeight.w400,
|
||||||
fontSize: 12.0),
|
// fontStyle: FontStyle.normal,
|
||||||
valueLabelRadius: 10,
|
// fontSize: 12.0),
|
||||||
maxValue: 5,
|
// valueLabelRadius: 10,
|
||||||
starSpacing: 2,
|
// maxValue: 5,
|
||||||
maxValueVisibility: false,
|
// starSpacing: 2,
|
||||||
valueLabelVisibility: false,
|
// maxValueVisibility: false,
|
||||||
animationDuration: Duration(milliseconds: 1000),
|
// valueLabelVisibility: false,
|
||||||
valueLabelPadding: const EdgeInsets.symmetric(
|
// animationDuration: Duration(milliseconds: 1000),
|
||||||
vertical: 1, horizontal: 8),
|
// valueLabelPadding: const EdgeInsets.symmetric(
|
||||||
valueLabelMargin: const EdgeInsets.only(right: 8),
|
// vertical: 1, horizontal: 8),
|
||||||
starOffColor: const Color(0xffe7e8ea),
|
// valueLabelMargin: const EdgeInsets.only(right: 8),
|
||||||
starColor: Colors.green,
|
// starOffColor: const Color(0xffe7e8ea),
|
||||||
),
|
// starColor: Colors.green,
|
||||||
Text(
|
// ),
|
||||||
"April 10, 2023",
|
// Text(
|
||||||
style: TextStyle(color: Colors.grey),
|
// "April 10, 2023",
|
||||||
),
|
// style: TextStyle(color: Colors.grey),
|
||||||
],
|
// ),
|
||||||
),
|
// ],
|
||||||
],
|
// ),
|
||||||
),
|
// ],
|
||||||
SizedBox(height: 10),
|
// ),
|
||||||
Row(
|
// SizedBox(height: 10),
|
||||||
crossAxisAlignment:
|
// Row(
|
||||||
CrossAxisAlignment.start, // Align items at the top
|
// crossAxisAlignment:
|
||||||
children: [
|
// CrossAxisAlignment.start, // Align items at the top
|
||||||
CircleAvatar(
|
// children: [
|
||||||
backgroundImage:
|
// CircleAvatar(
|
||||||
NetworkImage('https://via.placeholder.com/50'),
|
// backgroundImage:
|
||||||
),
|
// NetworkImage('https://via.placeholder.com/50'),
|
||||||
SizedBox(width: 10),
|
// ),
|
||||||
|
// SizedBox(width: 10),
|
||||||
|
|
||||||
// Column for Text and RatingStars
|
// // Column for Text and RatingStars
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Column(
|
// child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
Row(
|
// Row(
|
||||||
mainAxisAlignment: MainAxisAlignment
|
// mainAxisAlignment: MainAxisAlignment
|
||||||
.spaceBetween, // Proper spacing
|
// .spaceBetween, // Proper spacing
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
"Johnson Smith",
|
// "",
|
||||||
style:
|
// style:
|
||||||
TextStyle(fontWeight: FontWeight.bold),
|
// TextStyle(fontWeight: FontWeight.bold),
|
||||||
),
|
// ),
|
||||||
RatingStars(
|
// RatingStars(
|
||||||
value: value,
|
// value: value,
|
||||||
starBuilder: (index, color) => Icon(
|
// starBuilder: (index, color) => Icon(
|
||||||
Icons.star,
|
// Icons.star,
|
||||||
color: color,
|
// color: color,
|
||||||
),
|
// ),
|
||||||
starCount: 5,
|
// starCount: 5,
|
||||||
starSize: 20,
|
// starSize: 20,
|
||||||
maxValue: 5,
|
// maxValue: 5,
|
||||||
starSpacing: 2,
|
// starSpacing: 2,
|
||||||
maxValueVisibility: false,
|
// maxValueVisibility: false,
|
||||||
valueLabelVisibility: false,
|
// valueLabelVisibility: false,
|
||||||
animationDuration:
|
// animationDuration:
|
||||||
Duration(milliseconds: 1000),
|
// Duration(milliseconds: 1000),
|
||||||
valueLabelPadding:
|
// valueLabelPadding:
|
||||||
const EdgeInsets.symmetric(
|
// const EdgeInsets.symmetric(
|
||||||
vertical: 1, horizontal: 8),
|
// vertical: 1, horizontal: 8),
|
||||||
valueLabelMargin:
|
// valueLabelMargin:
|
||||||
const EdgeInsets.only(right: 8),
|
// const EdgeInsets.only(right: 8),
|
||||||
starOffColor: const Color(0xffe7e8ea),
|
// starOffColor: const Color(0xffe7e8ea),
|
||||||
starColor: Colors.green,
|
// starColor: Colors.green,
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 4),
|
// SizedBox(height: 4),
|
||||||
Text(
|
// Text(
|
||||||
"April 10, 2023",
|
// "",
|
||||||
style: TextStyle(color: Colors.grey),
|
// style: TextStyle(color: Colors.grey),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
SizedBox(height: 10),
|
// SizedBox(height: 10),
|
||||||
ReadMoreText(
|
// ReadMoreText(
|
||||||
'Flutter is Google’s mobile UI open source framework to build high-quality native (super fast) interfaces for iOS and Android apps with the unified codebase.',
|
// '',
|
||||||
trimMode: TrimMode.Line,
|
// trimMode: TrimMode.Line,
|
||||||
trimLines: 2,
|
// trimLines: 2,
|
||||||
colorClickableText: APPCOLOR.appGreen,
|
// colorClickableText: APPCOLOR.appGreen,
|
||||||
trimCollapsedText: 'Read More',
|
// trimCollapsedText: 'Read More',
|
||||||
trimExpandedText: 'Show less',
|
// trimExpandedText: 'Show less',
|
||||||
style: context.customMedium(APPCOLOR.balck1A1A1A, 14),
|
// style: context.customMedium(APPCOLOR.balck1A1A1A, 14),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1033,7 +1035,27 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
.productImages?.first?.url ??
|
.productImages?.first?.url ??
|
||||||
"",
|
"",
|
||||||
backGroundColor: Colors.transparent,
|
backGroundColor: Colors.transparent,
|
||||||
|
radius: 10,
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
right: 1,
|
||||||
|
bottom: 0,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 10, vertical: 10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.red,
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct!.discountPrice))}% OFF",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 15)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -1068,7 +1090,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.discountPrice ?? ""} ",
|
"₹${bestdealproduct.discountPrice ?? ""} ",
|
||||||
@@ -1076,7 +1098,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: context.customSemiBold(
|
style: context.customSemiBold(
|
||||||
Colors.black, 12),
|
Colors.black, 15),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"₹${bestdealproduct.basePrice ?? ""}",
|
"₹${bestdealproduct.basePrice ?? ""}",
|
||||||
@@ -1086,7 +1108,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
|||||||
style: context
|
style: context
|
||||||
.customMedium(
|
.customMedium(
|
||||||
Colors.grey.withOpacity(0.8),
|
Colors.grey.withOpacity(0.8),
|
||||||
12,
|
15,
|
||||||
)
|
)
|
||||||
.copyWith(
|
.copyWith(
|
||||||
decoration:
|
decoration:
|
||||||
|
|||||||
@@ -330,7 +330,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void _showBottomSheet(BuildContext context) {
|
void _showBottomSheet(BuildContext context) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
|
|||||||
Reference in New Issue
Block a user