review issue fixed

This commit is contained in:
2025-03-24 18:09:54 +05:30
parent 4b6a33aac4
commit cd7d33eace
16 changed files with 517 additions and 282 deletions

BIN
.DS_Store vendored

Binary file not shown.

View 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.

View File

@@ -0,0 +1 @@
{"version":2,"entries":[{"package":"grocery_app","rootUri":"../","packageUri":"lib/"}]}

View File

@@ -1010,7 +1010,7 @@
"languageVersion": "3.4"
}
],
"generated": "2025-03-22T13:23:26.634731Z",
"generated": "2025-03-24T12:39:30.338613Z",
"generator": "pub",
"generatorVersion": "3.4.4",
"flutterRoot": "file:///Users/rajeevsingh/Documents/allSoftwares/flutter",

File diff suppressed because one or more lines are too long

View File

@@ -38,9 +38,11 @@ class AppNetworkImage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CachedNetworkImage(
height: height,
width: width,
return
CachedNetworkImage(
/// height: height,
///width: width,
errorWidget: (context, url, error) {
return Container(
height: height,
@@ -60,10 +62,8 @@ class AppNetworkImage extends StatelessWidget {
)),
);
},
placeholder: (context, url)
{
return
Container(
placeholder: (context, url) {
return Container(
width: width,
height: height,
decoration: BoxDecoration(
@@ -78,11 +78,10 @@ class AppNetworkImage extends StatelessWidget {
),
);
},
imageBuilder: (context, cIMage) {
return Container(
width: width,
height: height,
// width: width,
height: 100,
decoration: BoxDecoration(
color: backGroundColor,
borderRadius: isFromSlider
@@ -96,14 +95,21 @@ class AppNetworkImage extends StatelessWidget {
bottomRight: Radius.circular(radius!),
)
: 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(
fit: boxFit ?? BoxFit.contain,
colorFilter: isShowColor ? ColorFilter.mode(imageColor ?? APPCOLOR.bgGrey, BlendMode.srcIn) : null,
fit: boxFit ?? BoxFit.fill,
colorFilter: isShowColor
? ColorFilter.mode(
imageColor ?? APPCOLOR.bgGrey, BlendMode.srcIn)
: null,
image: cIMage,
)),
);
},
imageUrl: imageUrl);
}
}

View File

@@ -78,25 +78,31 @@ class OrderProvider extends ChangeNotifier {
String productId,
) async {
context.showLoader(show: true);
notifyListeners();
try {
var result = await _orderRepo.productReview(data, productId);
return result.fold(
(error)
{
(error) {
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;
},
(response)
{
(response) {
context.showLoader(show: false);
return true;
},
);
} catch (e)
{
} catch (e) {
context.showLoader(show: false);
Fluttertoast.showToast(
msg: "Something went wrong ",

View File

@@ -133,8 +133,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
}
Widget floatingAction() {
return Consumer<ProductProvider>(builder: (context, provider, child)
{
return Consumer<ProductProvider>(builder: (context, provider, child) {
if (provider.countList.isEmpty) {
return Center();
} else {
@@ -354,6 +353,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
.productImages?.first.url ??
"",
backGroundColor: Colors.transparent,
radius: 10,
),
),
Positioned(
@@ -361,7 +361,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 2),
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(5),
@@ -370,7 +370,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
child: Text(
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white, fontSize: 12)),
color: Colors.white, fontSize: 15)),
),
),
)
@@ -403,7 +403,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
Spacer(),
Row(
children: [
Row(
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
@@ -411,7 +411,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style:
context.customSemiBold(Colors.black, 12),
context.customSemiBold(Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
@@ -421,7 +421,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
12,
15,
)
.copyWith(
decoration: TextDecoration.lineThrough,

View File

@@ -156,20 +156,21 @@ class _MycartState extends State<Mycart> {
alignment: Alignment.center,
children: [
AppNetworkImage(
height: MediaQuery.of(context).size.height *
height:
MediaQuery.of(context).size.height *
0.08,
width: cardWidth * 0.7,
imageUrl: bestdealproduct
.productImages?.first?.url ??
"",
backGroundColor: Colors.transparent,
),
radius: 10),
Positioned(
right: 1,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 2),
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(5),
@@ -179,7 +180,7 @@ class _MycartState extends State<Mycart> {
"${calculateDiscountPercentage(double.parse(bestdealproduct!.basePrice), double.parse(bestdealproduct!.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white,
fontSize: 12)),
fontSize: 15)),
),
),
)
@@ -217,7 +218,7 @@ class _MycartState extends State<Mycart> {
const Spacer(),
Row(
children: [
Row(
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
@@ -225,7 +226,7 @@ class _MycartState extends State<Mycart> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 12),
Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
@@ -234,7 +235,7 @@ class _MycartState extends State<Mycart> {
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
12,
15,
)
.copyWith(
decoration:
@@ -760,8 +761,7 @@ class _MycartState extends State<Mycart> {
color: Colors.white,
),
);
} else if (provider.allitem == null)
{
} else if (provider.allitem == null) {
return Center(child: Text('🛒 Your Front Shop Cart is empty'));
} else if (provider.allitem.items == null ||
provider.allitem.items!.isEmpty) {
@@ -791,8 +791,7 @@ class _MycartState extends State<Mycart> {
size: 15,
),
onTap: () {
if (provider.couponDataModel.data!.isNotEmpty)
{
if (provider.couponDataModel.data!.isNotEmpty) {
context.push(MyRoutes.COUPONSSCREEN,
extra: provider.allitem.id);
} else {
@@ -813,7 +812,7 @@ class _MycartState extends State<Mycart> {
SummaryRow(
label: 'Item Total Price', value: '${provider.totalPrice}'),
SummaryRow(label: 'Discount Price', value: "${provider.discount}"),
SummaryRow(label: 'Delivery Free', value: 'Free', isGreen: true),
// SummaryRow(label: 'Delivery Free', value: 'Free', isGreen: true),
Divider(
thickness: 0.2,
),

View File

@@ -92,6 +92,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
.productDatumlastImageurl ??
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
backGroundColor: Colors.white,
),
),
],
@@ -215,6 +216,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
backGroundColor: APPCOLOR.bgGrey,
height: 20,
width: 20,
radius: 10,
),
),
),

View File

@@ -1,3 +1,4 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -224,13 +225,14 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
.productImages!.first.url ??
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
backGroundColor: Colors.transparent,
radius: 10,
),
Positioned(
right: 1,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 2),
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius:
@@ -241,7 +243,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white,
fontSize: 12)),
fontSize: 15)),
),
),
)
@@ -347,7 +349,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 16),
Colors.black, 15),
),
const SizedBox(width: 5),
Text(
@@ -358,7 +360,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
16,
15,
)
.copyWith(
decoration:
@@ -560,34 +562,167 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
)
.toList(),
child: Center(
child: Container(
child: AppNetworkImage(
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',
backGroundColor: APPCOLOR.bgGrey,
radius: 10,
),
),
),
'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,
// ),
// ),
// ),
),
} else ...{
Column(
children: [
Center(
child: Container(
child: AppNetworkImage(
// Center(
// child: Container(
// child: AppNetworkImage(
// height: 50,
// width: 50,
// imageUrl: category.image ??
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
// backGroundColor: APPCOLOR.bgGrey,
// 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,
imageUrl: category.image ??
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
backGroundColor: APPCOLOR.bgGrey,
radius: 10,
),
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(
height: 5,
),

View File

@@ -522,6 +522,7 @@ class _HomeScreenState extends State<HomeScreen> {
?.first
?.url ??
"",
radius: 10,
backGroundColor: Colors.transparent,
),
Positioned(
@@ -529,7 +530,7 @@ class _HomeScreenState extends State<HomeScreen> {
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 6, vertical: 2),
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius:
@@ -540,7 +541,9 @@ class _HomeScreenState extends State<HomeScreen> {
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white,
fontSize: 12)),
fontWeight:
FontWeight.bold,
fontSize: 18)),
),
),
)
@@ -579,7 +582,7 @@ class _HomeScreenState extends State<HomeScreen> {
const Spacer(),
Row(
children: [
Row(
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
@@ -587,7 +590,7 @@ class _HomeScreenState extends State<HomeScreen> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 11),
Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
@@ -598,7 +601,7 @@ class _HomeScreenState extends State<HomeScreen> {
.customMedium(
Colors.grey
.withOpacity(0.8),
12)
15)
.copyWith(
decoration: TextDecoration
.lineThrough),

View File

@@ -285,7 +285,6 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
],
),
),
if (orderitem.orderItemStatus == "DELIVERED")
RichText(
text: TextSpan(
@@ -300,12 +299,13 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
color: Colors.blue,
decoration: TextDecoration.underline,
),
recognizer: TapGestureRecognizer()..onTap = () {
recognizer: TapGestureRecognizer()
..onTap = () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
RatingScreen(orderId: orderitem.productId),
builder: (context) => RatingScreen(
orderId: orderitem.productId),
),
);
},

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.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/utils/constants/color_constant.dart';
import 'package:grocery_app/utils/extensions/uicontext.dart';
@@ -96,23 +97,53 @@ class _RatingScreenState extends State<RatingScreen> {
child: Center(
child: InkWell(
onTap: () async {
if (_rating == 0.0) {
Fluttertoast.showToast(
msg: "Please Give a rating atleast 1 star",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 14.0,
);
} 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(),
"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"),
),
);
// ScaffoldMessenger.of(context).showSnackBar(
// SnackBar(
// content: Text("failed to Give feedback"),
// ),
// );
}
}
// if (_formKey.currentState?.validate() ?? false) {

View File

@@ -152,6 +152,7 @@ class _ProductDetailsState extends State<ProductDetails> {
width: 2000,
imageUrl: productImage.url,
backGroundColor: Colors.transparent,
radius: 10,
);
// Image.network(productImage.url ??
@@ -800,135 +801,136 @@ class _ProductDetailsState extends State<ProductDetails> {
],
),
)
: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Reviews & Ratings",
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.bold)),
SizedBox(height: 10),
Row(
children: [
Text("4.2",
style: TextStyle(
fontSize: 30, fontWeight: FontWeight.bold)),
SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RatingStars(
value: value,
onValueChanged: (v) {
//
},
starBuilder: (index, color) => Icon(
Icons.star,
color: color,
),
starCount: 5,
starSize: 20,
valueLabelColor: const Color(0xff9b9b9b),
valueLabelTextStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal,
fontSize: 12.0),
valueLabelRadius: 10,
maxValue: 5,
starSpacing: 2,
maxValueVisibility: false,
valueLabelVisibility: false,
animationDuration: Duration(milliseconds: 1000),
valueLabelPadding: const EdgeInsets.symmetric(
vertical: 1, horizontal: 8),
valueLabelMargin: const EdgeInsets.only(right: 8),
starOffColor: const Color(0xffe7e8ea),
starColor: Colors.green,
),
Text(
"April 10, 2023",
style: TextStyle(color: Colors.grey),
),
],
),
],
),
SizedBox(height: 10),
Row(
crossAxisAlignment:
CrossAxisAlignment.start, // Align items at the top
children: [
CircleAvatar(
backgroundImage:
NetworkImage('https://via.placeholder.com/50'),
),
SizedBox(width: 10),
: SizedBox.shrink();
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text("Reviews & Ratings",
// style: TextStyle(
// fontSize: 20, fontWeight: FontWeight.bold)),
// SizedBox(height: 10),
// Row(
// children: [
// Text("4.2",
// style: TextStyle(
// fontSize: 30, fontWeight: FontWeight.bold)),
// SizedBox(
// width: 10,
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// RatingStars(
// value: value,
// onValueChanged: (v) {
// //
// },
// starBuilder: (index, color) => Icon(
// Icons.star,
// color: color,
// ),
// starCount: 5,
// starSize: 20,
// valueLabelColor: const Color(0xff9b9b9b),
// valueLabelTextStyle: const TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.w400,
// fontStyle: FontStyle.normal,
// fontSize: 12.0),
// valueLabelRadius: 10,
// maxValue: 5,
// starSpacing: 2,
// maxValueVisibility: false,
// valueLabelVisibility: false,
// animationDuration: Duration(milliseconds: 1000),
// valueLabelPadding: const EdgeInsets.symmetric(
// vertical: 1, horizontal: 8),
// valueLabelMargin: const EdgeInsets.only(right: 8),
// starOffColor: const Color(0xffe7e8ea),
// starColor: Colors.green,
// ),
// Text(
// "April 10, 2023",
// style: TextStyle(color: Colors.grey),
// ),
// ],
// ),
// ],
// ),
// SizedBox(height: 10),
// Row(
// crossAxisAlignment:
// CrossAxisAlignment.start, // Align items at the top
// children: [
// CircleAvatar(
// backgroundImage:
// NetworkImage('https://via.placeholder.com/50'),
// ),
// SizedBox(width: 10),
// Column for Text and RatingStars
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment
.spaceBetween, // Proper spacing
children: [
Text(
"Johnson Smith",
style:
TextStyle(fontWeight: FontWeight.bold),
),
RatingStars(
value: value,
starBuilder: (index, color) => Icon(
Icons.star,
color: color,
),
starCount: 5,
starSize: 20,
maxValue: 5,
starSpacing: 2,
maxValueVisibility: false,
valueLabelVisibility: false,
animationDuration:
Duration(milliseconds: 1000),
valueLabelPadding:
const EdgeInsets.symmetric(
vertical: 1, horizontal: 8),
valueLabelMargin:
const EdgeInsets.only(right: 8),
starOffColor: const Color(0xffe7e8ea),
starColor: Colors.green,
),
],
),
SizedBox(height: 4),
Text(
"April 10, 2023",
style: TextStyle(color: Colors.grey),
),
],
),
),
],
),
SizedBox(height: 10),
ReadMoreText(
'Flutter is Googles 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,
trimLines: 2,
colorClickableText: APPCOLOR.appGreen,
trimCollapsedText: 'Read More',
trimExpandedText: 'Show less',
style: context.customMedium(APPCOLOR.balck1A1A1A, 14),
),
],
),
);
// // Column for Text and RatingStars
// Expanded(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment
// .spaceBetween, // Proper spacing
// children: [
// Text(
// "",
// style:
// TextStyle(fontWeight: FontWeight.bold),
// ),
// RatingStars(
// value: value,
// starBuilder: (index, color) => Icon(
// Icons.star,
// color: color,
// ),
// starCount: 5,
// starSize: 20,
// maxValue: 5,
// starSpacing: 2,
// maxValueVisibility: false,
// valueLabelVisibility: false,
// animationDuration:
// Duration(milliseconds: 1000),
// valueLabelPadding:
// const EdgeInsets.symmetric(
// vertical: 1, horizontal: 8),
// valueLabelMargin:
// const EdgeInsets.only(right: 8),
// starOffColor: const Color(0xffe7e8ea),
// starColor: Colors.green,
// ),
// ],
// ),
// SizedBox(height: 4),
// Text(
// "",
// style: TextStyle(color: Colors.grey),
// ),
// ],
// ),
// ),
// ],
// ),
// SizedBox(height: 10),
// ReadMoreText(
// '',
// trimMode: TrimMode.Line,
// trimLines: 2,
// colorClickableText: APPCOLOR.appGreen,
// trimCollapsedText: 'Read More',
// trimExpandedText: 'Show less',
// style: context.customMedium(APPCOLOR.balck1A1A1A, 14),
// ),
// ],
// ),
// );
}
});
}
@@ -1033,7 +1035,27 @@ class _ProductDetailsState extends State<ProductDetails> {
.productImages?.first?.url ??
"",
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(),
Row(
children: [
Row(
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
@@ -1076,7 +1098,7 @@ class _ProductDetailsState extends State<ProductDetails> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 12),
Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
@@ -1086,7 +1108,7 @@ class _ProductDetailsState extends State<ProductDetails> {
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
12,
15,
)
.copyWith(
decoration:

View File

@@ -330,7 +330,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
);
}
void _showBottomSheet(BuildContext context) {
showModalBottomSheet(
context: context,