|
|
|
@ -80,12 +80,18 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: languageID == 'ar'
|
|
|
|
child: languageID == 'ar'
|
|
|
|
? Text(
|
|
|
|
? Text(
|
|
|
|
widget.product.discountDescriptionn,
|
|
|
|
widget.product
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
|
|
|
.discountDescriptionn,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 17),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Text(
|
|
|
|
: Text(
|
|
|
|
widget.product.discountDescription,
|
|
|
|
widget.product
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
|
|
|
.discountDescription,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 17),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -96,7 +102,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
flex: 0,
|
|
|
|
flex: 0,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
child: Image(
|
|
|
|
child: Image(
|
|
|
|
image: AssetImage('assets/images/offer.png'),
|
|
|
|
image: AssetImage(
|
|
|
|
|
|
|
|
'assets/images/offer.png'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -174,7 +181,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).details,
|
|
|
|
TranslationBase.of(context).details,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -202,7 +211,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).reviews,
|
|
|
|
TranslationBase.of(context).reviews,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -230,7 +241,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).availability,
|
|
|
|
TranslationBase.of(context).availability,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -258,7 +271,10 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -266,8 +282,13 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
languageID == 'ar' ? widget.product.shortDescriptionn : widget.product.shortDescription ?? "",
|
|
|
|
languageID == 'ar'
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'),
|
|
|
|
? widget.product.shortDescriptionn
|
|
|
|
|
|
|
|
: widget.product.shortDescription ??
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontFamily: 'WorkSans-Regular'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -276,7 +297,10 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).howToUse,
|
|
|
|
TranslationBase.of(context).howToUse,
|
|
|
|
style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -284,8 +308,12 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
languageID == 'ar' ? widget.product.fullDescriptionn : widget.product.fullDescription,
|
|
|
|
languageID == 'ar'
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'),
|
|
|
|
? widget.product.fullDescriptionn
|
|
|
|
|
|
|
|
: widget.product.fullDescription,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontFamily: 'WorkSans-Regular'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -293,41 +321,83 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: isReviews
|
|
|
|
: isReviews
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
onModelReady: (model) => model.getProductReviewsData(widget.product.id),
|
|
|
|
onModelReady: (model) =>
|
|
|
|
builder: (_, model, wi) =>
|
|
|
|
model.getProductReviewsData(
|
|
|
|
model.productDetailService.length != 0 && model.productDetailService[0].reviews.length != 0
|
|
|
|
widget.product.id),
|
|
|
|
|
|
|
|
builder: (_, model, wi) => model
|
|
|
|
|
|
|
|
.productDetailService
|
|
|
|
|
|
|
|
.length !=
|
|
|
|
|
|
|
|
0 &&
|
|
|
|
|
|
|
|
model.productDetailService[0]
|
|
|
|
|
|
|
|
.reviews.length !=
|
|
|
|
|
|
|
|
0
|
|
|
|
? ListView.builder(
|
|
|
|
? ListView.builder(
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
itemCount: model.productDetailService[0].reviews.length,
|
|
|
|
itemCount: model
|
|
|
|
|
|
|
|
.productDetailService[0]
|
|
|
|
|
|
|
|
.reviews
|
|
|
|
|
|
|
|
.length,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
itemBuilder: (BuildContext context,
|
|
|
|
|
|
|
|
int index) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment:
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productDetailService[0].reviews[index].customerId.toString(),
|
|
|
|
model
|
|
|
|
style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600),
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.customerId
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
|
|
|
color: Colors
|
|
|
|
|
|
|
|
.grey,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight
|
|
|
|
|
|
|
|
.w600),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 210),
|
|
|
|
margin:
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
EdgeInsets.only(
|
|
|
|
initialRating: model.productDetailService[0].reviews[index].rating.toDouble(),
|
|
|
|
left: 210),
|
|
|
|
|
|
|
|
child: RatingBar
|
|
|
|
|
|
|
|
.readOnly(
|
|
|
|
|
|
|
|
initialRating: model
|
|
|
|
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.rating
|
|
|
|
|
|
|
|
.toDouble(),
|
|
|
|
size: 15.0,
|
|
|
|
size: 15.0,
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
filledColor:
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
Colors.yellow[
|
|
|
|
isHalfAllowed: true,
|
|
|
|
700],
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
emptyColor: Colors
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
.grey[500],
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
isHalfAllowed:
|
|
|
|
|
|
|
|
true,
|
|
|
|
|
|
|
|
halfFilledIcon:
|
|
|
|
|
|
|
|
Icons
|
|
|
|
|
|
|
|
.star_half,
|
|
|
|
|
|
|
|
filledIcon:
|
|
|
|
|
|
|
|
Icons.star,
|
|
|
|
|
|
|
|
emptyIcon:
|
|
|
|
|
|
|
|
Icons.star,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -338,14 +408,21 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productDetailService[0].reviews[index].reviewText,
|
|
|
|
model
|
|
|
|
style: TextStyle(fontSize: 20),
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[index]
|
|
|
|
|
|
|
|
.reviewText,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 50,
|
|
|
|
height: 50,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(height: 1, color: Colors.grey),
|
|
|
|
Divider(
|
|
|
|
|
|
|
|
height: 1,
|
|
|
|
|
|
|
|
color: Colors.grey),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -359,32 +436,47 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: isAvailabilty
|
|
|
|
: isAvailabilty
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
onModelReady: (model) => model.getProductLocationData(),
|
|
|
|
onModelReady: (model) =>
|
|
|
|
builder: (_, model, wi) => model.productLocationService.length == 0
|
|
|
|
model.getProductLocationData(),
|
|
|
|
|
|
|
|
builder: (_, model, wi) => model
|
|
|
|
|
|
|
|
.productLocationService
|
|
|
|
|
|
|
|
.length ==
|
|
|
|
|
|
|
|
0
|
|
|
|
? Container(
|
|
|
|
? Container(
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('No location Available'),
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
'No location Available'),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: ListView.builder(
|
|
|
|
: ListView.builder(
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: model.productLocationService.length,
|
|
|
|
itemCount: model
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
.productLocationService
|
|
|
|
|
|
|
|
.length,
|
|
|
|
|
|
|
|
itemBuilder:
|
|
|
|
|
|
|
|
(BuildContext context,
|
|
|
|
|
|
|
|
int index) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
padding:
|
|
|
|
|
|
|
|
EdgeInsets.all(8.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
|
|
|
.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: Image.network(model.productLocationService[index].projectImageUrl),
|
|
|
|
child: Image.network(model
|
|
|
|
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.projectImageUrl),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
@ -392,31 +484,48 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 4,
|
|
|
|
flex: 4,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productLocationService[index].locationDescription +
|
|
|
|
model
|
|
|
|
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.locationDescription +
|
|
|
|
"\n" +
|
|
|
|
"\n" +
|
|
|
|
fixingString(model.productLocationService[0].cityName.toString()),
|
|
|
|
fixingString(model
|
|
|
|
style: TextStyle(fontSize: 12),
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.cityName
|
|
|
|
|
|
|
|
.toString()),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize:
|
|
|
|
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
icon: Icon(Icons.location_on),
|
|
|
|
icon: Icon(Icons
|
|
|
|
color: Colors.red,
|
|
|
|
.location_on),
|
|
|
|
onPressed: () {},
|
|
|
|
color:
|
|
|
|
|
|
|
|
Colors.red,
|
|
|
|
|
|
|
|
onPressed:
|
|
|
|
|
|
|
|
() {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
icon: Icon(Icons.phone),
|
|
|
|
icon: Icon(Icons
|
|
|
|
color: Colors.red,
|
|
|
|
.phone),
|
|
|
|
onPressed: () {},
|
|
|
|
color:
|
|
|
|
|
|
|
|
Colors.red,
|
|
|
|
|
|
|
|
onPressed:
|
|
|
|
|
|
|
|
() {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(height: 1.2, color: Colors.grey)
|
|
|
|
Divider(
|
|
|
|
|
|
|
|
height: 1.2,
|
|
|
|
|
|
|
|
color: Colors.grey)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -431,8 +540,12 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
bottomSheet: footerWidget(widget.product.stockAvailability != 'Out of stock', widget.product.orderMaximumQuantity,
|
|
|
|
bottomSheet: footerWidget(
|
|
|
|
widget.product.orderMinimumQuantity, widget.product.stockQuantity, widget.product),
|
|
|
|
widget.product.stockAvailability != 'Out of stock',
|
|
|
|
|
|
|
|
widget.product.orderMaximumQuantity,
|
|
|
|
|
|
|
|
widget.product.orderMinimumQuantity,
|
|
|
|
|
|
|
|
widget.product.stockQuantity,
|
|
|
|
|
|
|
|
widget.product),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: AppScaffold(
|
|
|
|
: AppScaffold(
|
|
|
|
appBarTitle: 'product detail page',
|
|
|
|
appBarTitle: 'product detail page',
|
|
|
|
@ -465,12 +578,18 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
child: languageID == 'ar'
|
|
|
|
child: languageID == 'ar'
|
|
|
|
? Text(
|
|
|
|
? Text(
|
|
|
|
widget.product.discountDescriptionn,
|
|
|
|
widget.product
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
|
|
|
.discountDescriptionn,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 17),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Text(
|
|
|
|
: Text(
|
|
|
|
widget.product.discountDescription,
|
|
|
|
widget.product
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
|
|
|
.discountDescription,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 17),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -481,7 +600,8 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
flex: 0,
|
|
|
|
flex: 0,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
child: Image(
|
|
|
|
child: Image(
|
|
|
|
image: AssetImage('assets/images/offer.png'),
|
|
|
|
image: AssetImage(
|
|
|
|
|
|
|
|
'assets/images/offer.png'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -551,7 +671,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).details,
|
|
|
|
TranslationBase.of(context).details,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -579,7 +701,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).reviews,
|
|
|
|
TranslationBase.of(context).reviews,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -607,7 +731,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).availability,
|
|
|
|
TranslationBase.of(context).availability,
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -635,7 +761,10 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
TranslationBase.of(context).description,
|
|
|
|
style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
@ -643,8 +772,12 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
languageID == 'ar' ? widget.product.fullDescriptionn : widget.product.fullDescription,
|
|
|
|
languageID == 'ar'
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: 'WorkSans-Regular'),
|
|
|
|
? widget.product.fullDescriptionn
|
|
|
|
|
|
|
|
: widget.product.fullDescription,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
|
|
|
fontFamily: 'WorkSans-Regular'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -652,41 +785,83 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: isReviews
|
|
|
|
: isReviews
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
onModelReady: (model) => model.getProductReviewsData(widget.product.id),
|
|
|
|
onModelReady: (model) =>
|
|
|
|
builder: (_, model, wi) =>
|
|
|
|
model.getProductReviewsData(
|
|
|
|
model.productDetailService.length != 0 && model.productDetailService[0].reviews.length != 0
|
|
|
|
widget.product.id),
|
|
|
|
|
|
|
|
builder: (_, model, wi) => model
|
|
|
|
|
|
|
|
.productDetailService
|
|
|
|
|
|
|
|
.length !=
|
|
|
|
|
|
|
|
0 &&
|
|
|
|
|
|
|
|
model.productDetailService[0]
|
|
|
|
|
|
|
|
.reviews.length !=
|
|
|
|
|
|
|
|
0
|
|
|
|
? ListView.builder(
|
|
|
|
? ListView.builder(
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
itemCount: model.productDetailService[0].reviews.length,
|
|
|
|
itemCount: model
|
|
|
|
|
|
|
|
.productDetailService[0]
|
|
|
|
|
|
|
|
.reviews
|
|
|
|
|
|
|
|
.length,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
itemBuilder: (BuildContext context,
|
|
|
|
|
|
|
|
int index) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment:
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productDetailService[0].reviews[index].customerId.toString(),
|
|
|
|
model
|
|
|
|
style: TextStyle(fontSize: 17, color: Colors.grey, fontWeight: FontWeight.w600),
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.customerId
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 17,
|
|
|
|
|
|
|
|
color: Colors
|
|
|
|
|
|
|
|
.grey,
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight
|
|
|
|
|
|
|
|
.w600),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 210),
|
|
|
|
margin:
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
EdgeInsets.only(
|
|
|
|
initialRating: model.productDetailService[0].reviews[index].rating.toDouble(),
|
|
|
|
left: 210),
|
|
|
|
|
|
|
|
child: RatingBar
|
|
|
|
|
|
|
|
.readOnly(
|
|
|
|
|
|
|
|
initialRating: model
|
|
|
|
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.rating
|
|
|
|
|
|
|
|
.toDouble(),
|
|
|
|
size: 15.0,
|
|
|
|
size: 15.0,
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
filledColor:
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
Colors.yellow[
|
|
|
|
isHalfAllowed: true,
|
|
|
|
700],
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
emptyColor: Colors
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
.grey[500],
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
isHalfAllowed:
|
|
|
|
|
|
|
|
true,
|
|
|
|
|
|
|
|
halfFilledIcon:
|
|
|
|
|
|
|
|
Icons
|
|
|
|
|
|
|
|
.star_half,
|
|
|
|
|
|
|
|
filledIcon:
|
|
|
|
|
|
|
|
Icons.star,
|
|
|
|
|
|
|
|
emptyIcon:
|
|
|
|
|
|
|
|
Icons.star,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -697,14 +872,21 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productDetailService[0].reviews[index].reviewText,
|
|
|
|
model
|
|
|
|
style: TextStyle(fontSize: 20),
|
|
|
|
.productDetailService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.reviews[index]
|
|
|
|
|
|
|
|
.reviewText,
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 50,
|
|
|
|
height: 50,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(height: 1, color: Colors.grey),
|
|
|
|
Divider(
|
|
|
|
|
|
|
|
height: 1,
|
|
|
|
|
|
|
|
color: Colors.grey),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -718,13 +900,17 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: isAvailabilty
|
|
|
|
: isAvailabilty
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
? BaseView<ProductDetailViewModel>(
|
|
|
|
onModelReady: (model) => model.getProductLocationData(),
|
|
|
|
onModelReady: (model) =>
|
|
|
|
builder: (_, model, wi) => ListView.builder(
|
|
|
|
model.getProductLocationData(),
|
|
|
|
|
|
|
|
builder: (_, model, wi) =>
|
|
|
|
|
|
|
|
ListView.builder(
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
itemCount: model.productLocationService.length,
|
|
|
|
itemCount: model
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
.productLocationService.length,
|
|
|
|
|
|
|
|
itemBuilder: (BuildContext context,
|
|
|
|
|
|
|
|
int index) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
@ -733,11 +919,15 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: Image.network(model.productLocationService[index].projectImageUrl),
|
|
|
|
child: Image.network(model
|
|
|
|
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.projectImageUrl),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
width: 10,
|
|
|
|
width: 10,
|
|
|
|
@ -745,16 +935,25 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 4,
|
|
|
|
flex: 4,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
model.productLocationService[index].locationDescription +
|
|
|
|
model
|
|
|
|
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
index]
|
|
|
|
|
|
|
|
.locationDescription +
|
|
|
|
"\n" +
|
|
|
|
"\n" +
|
|
|
|
fixingString(model.productLocationService[0].cityName.toString()),
|
|
|
|
fixingString(model
|
|
|
|
style: TextStyle(fontSize: 12),
|
|
|
|
.productLocationService[
|
|
|
|
|
|
|
|
0]
|
|
|
|
|
|
|
|
.cityName
|
|
|
|
|
|
|
|
.toString()),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
icon: Icon(Icons.location_on),
|
|
|
|
icon: Icon(Icons
|
|
|
|
|
|
|
|
.location_on),
|
|
|
|
color: Colors.red,
|
|
|
|
color: Colors.red,
|
|
|
|
onPressed: () {},
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -762,14 +961,17 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
icon: Icon(Icons.phone),
|
|
|
|
icon:
|
|
|
|
|
|
|
|
Icon(Icons.phone),
|
|
|
|
color: Colors.red,
|
|
|
|
color: Colors.red,
|
|
|
|
onPressed: () {},
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(height: 1.2, color: Colors.grey)
|
|
|
|
Divider(
|
|
|
|
|
|
|
|
height: 1.2,
|
|
|
|
|
|
|
|
color: Colors.grey)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -784,8 +986,12 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
bottomSheet: footerWidget(widget.product.stockAvailability != 'Out of stock', widget.product.orderMaximumQuantity,
|
|
|
|
bottomSheet: footerWidget(
|
|
|
|
widget.product.orderMinimumQuantity, widget.product.stockQuantity, widget.product),
|
|
|
|
widget.product.stockAvailability != 'Out of stock',
|
|
|
|
|
|
|
|
widget.product.orderMaximumQuantity,
|
|
|
|
|
|
|
|
widget.product.orderMinimumQuantity,
|
|
|
|
|
|
|
|
widget.product.stockQuantity,
|
|
|
|
|
|
|
|
widget.product),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -796,7 +1002,8 @@ class footerWidget extends StatefulWidget {
|
|
|
|
final int minQuantity;
|
|
|
|
final int minQuantity;
|
|
|
|
final int quantityLimit;
|
|
|
|
final int quantityLimit;
|
|
|
|
final PharmacyProduct item;
|
|
|
|
final PharmacyProduct item;
|
|
|
|
footerWidget(this.isAvailble, this.maxQuantity, this.minQuantity, this.quantityLimit, this.item);
|
|
|
|
footerWidget(this.isAvailble, this.maxQuantity, this.minQuantity,
|
|
|
|
|
|
|
|
this.quantityLimit, this.item);
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_footerWidgetState createState() => _footerWidgetState();
|
|
|
|
_footerWidgetState createState() => _footerWidgetState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -826,7 +1033,8 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).quantity,
|
|
|
|
TranslationBase.of(context).quantity,
|
|
|
|
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 15, fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// ListView(
|
|
|
|
// ListView(
|
|
|
|
@ -848,7 +1056,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'1',
|
|
|
|
'1',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -873,7 +1083,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'2',
|
|
|
|
'2',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -898,7 +1110,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'3',
|
|
|
|
'3',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -923,7 +1137,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'4',
|
|
|
|
'4',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -948,7 +1164,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'5',
|
|
|
|
'5',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -973,7 +1191,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'6',
|
|
|
|
'6',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -998,7 +1218,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'7',
|
|
|
|
'7',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -1023,7 +1245,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'8',
|
|
|
|
'8',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -1048,7 +1272,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'9',
|
|
|
|
'9',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -1073,7 +1299,9 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'10',
|
|
|
|
'10',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
@ -1094,7 +1322,8 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: 50.0,
|
|
|
|
width: 50.0,
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
decoration: InputDecoration(labelText: 'quantity #'),
|
|
|
|
decoration:
|
|
|
|
|
|
|
|
InputDecoration(labelText: 'quantity #'),
|
|
|
|
onChanged: (text) {
|
|
|
|
onChanged: (text) {
|
|
|
|
print(price);
|
|
|
|
print(price);
|
|
|
|
print(widget.quantityLimit);
|
|
|
|
print(widget.quantityLimit);
|
|
|
|
@ -1173,7 +1402,10 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).addToCart,
|
|
|
|
TranslationBase.of(context).addToCart,
|
|
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -1188,7 +1420,10 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.green,
|
|
|
|
color: Colors.green,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).addToCart,
|
|
|
|
TranslationBase.of(context).addToCart,
|
|
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -1204,7 +1439,10 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
alignment: Alignment.center,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).buyNow,
|
|
|
|
TranslationBase.of(context).buyNow,
|
|
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -1214,7 +1452,8 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
addToCartFunction(price, widget.item.id);
|
|
|
|
addToCartFunction(price, widget.item.id);
|
|
|
|
Navigator.push(
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(builder: (context) => CartOrderPage()),
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
|
|
|
builder: (context) => CartOrderPage()),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
@ -1224,7 +1463,10 @@ class _footerWidgetState extends State<footerWidget> {
|
|
|
|
color: Colors.blue,
|
|
|
|
color: Colors.blue,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).buyNow,
|
|
|
|
TranslationBase.of(context).buyNow,
|
|
|
|
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -1265,12 +1507,15 @@ class _productNameAndPriceState extends State<productNameAndPrice> {
|
|
|
|
widget.item.stockAvailability,
|
|
|
|
widget.item.stockAvailability,
|
|
|
|
style: widget.item.stockAvailability == 'Out of stock'
|
|
|
|
style: widget.item.stockAvailability == 'Out of stock'
|
|
|
|
? TextStyle(fontWeight: FontWeight.bold, color: Colors.red)
|
|
|
|
? TextStyle(fontWeight: FontWeight.bold, color: Colors.red)
|
|
|
|
: TextStyle(fontWeight: FontWeight.bold, color: Colors.green),
|
|
|
|
: TextStyle(
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold, color: Colors.green),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 20),
|
|
|
|
SizedBox(width: 20),
|
|
|
|
widget.item.stockAvailability == 'Out of stock' && customerId != null
|
|
|
|
widget.item.stockAvailability == 'Out of stock' &&
|
|
|
|
|
|
|
|
customerId != null
|
|
|
|
? InkWell(
|
|
|
|
? InkWell(
|
|
|
|
onTap: () => notifyMeWhenAvailable(context, widget.item.id),
|
|
|
|
onTap: () =>
|
|
|
|
|
|
|
|
notifyMeWhenAvailable(context, widget.item.id),
|
|
|
|
child: Row(children: [
|
|
|
|
child: Row(children: [
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).notifyMe,
|
|
|
|
TranslationBase.of(context).notifyMe,
|
|
|
|
@ -1288,7 +1533,9 @@ class _productNameAndPriceState extends State<productNameAndPrice> {
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
: Container(
|
|
|
|
margin: languageID == 'ar' ? EdgeInsets.only(right: 25) : EdgeInsets.only(left: 25),
|
|
|
|
margin: languageID == 'ar'
|
|
|
|
|
|
|
|
? EdgeInsets.only(right: 25)
|
|
|
|
|
|
|
|
: EdgeInsets.only(left: 25),
|
|
|
|
width: 40,
|
|
|
|
width: 40,
|
|
|
|
height: 40,
|
|
|
|
height: 40,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
@ -1324,9 +1571,12 @@ class _productNameAndPriceState extends State<productNameAndPrice> {
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
margin: EdgeInsets.only(left: 5),
|
|
|
|
child: Align(
|
|
|
|
child: Align(
|
|
|
|
alignment: languageID == 'ar' ? Alignment.topRight : Alignment.topLeft,
|
|
|
|
alignment:
|
|
|
|
|
|
|
|
languageID == 'ar' ? Alignment.topRight : Alignment.topLeft,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
languageID == 'ar' ? widget.item.fullDescriptionn : widget.item.fullDescription,
|
|
|
|
languageID == 'ar'
|
|
|
|
|
|
|
|
? widget.item.fullDescriptionn
|
|
|
|
|
|
|
|
: widget.item.fullDescription,
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -1358,7 +1608,9 @@ class _productNameAndPriceState extends State<productNameAndPrice> {
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
child: widget.item.rxMessage != null
|
|
|
|
child: widget.item.rxMessage != null
|
|
|
|
? Text(
|
|
|
|
? Text(
|
|
|
|
languageID == 'ar' ? widget.item.rxMessagen.toString() : widget.item.rxMessage.toString(),
|
|
|
|
languageID == 'ar'
|
|
|
|
|
|
|
|
? widget.item.rxMessagen.toString()
|
|
|
|
|
|
|
|
: widget.item.rxMessage.toString(),
|
|
|
|
style: TextStyle(color: Colors.red, fontSize: 10),
|
|
|
|
style: TextStyle(color: Colors.red, fontSize: 10),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: Container()),
|
|
|
|
: Container()),
|
|
|
|
@ -1524,7 +1776,9 @@ slideDetail() {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: const Text('1', textAlign: TextAlign.center, style: TextStyle(color: Color(0xFF000000))),
|
|
|
|
child: const Text('1',
|
|
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
style: TextStyle(color: Color(0xFF000000))),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -1606,7 +1860,13 @@ settingModalBottomSheet(context) {
|
|
|
|
leading: new Icon(Icons.shopping_cart),
|
|
|
|
leading: new Icon(Icons.shopping_cart),
|
|
|
|
title: new Text('Add to cart'),
|
|
|
|
title: new Text('Add to cart'),
|
|
|
|
onTap: () => {
|
|
|
|
onTap: () => {
|
|
|
|
if (price > 0) {addToCartFunction(price, itemID)} else {AppToast.showErrorToast(message: "you should add quantity")}
|
|
|
|
if (price > 0)
|
|
|
|
|
|
|
|
{addToCartFunction(price, itemID)}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AppToast.showErrorToast(
|
|
|
|
|
|
|
|
message: "you should add quantity")
|
|
|
|
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
new ListTile(
|
|
|
|
new ListTile(
|
|
|
|
leading: new Icon(Icons.favorite_border),
|
|
|
|
leading: new Icon(Icons.favorite_border),
|
|
|
|
@ -1617,7 +1877,8 @@ settingModalBottomSheet(context) {
|
|
|
|
leading: new Icon(Icons.compare),
|
|
|
|
leading: new Icon(Icons.compare),
|
|
|
|
title: new Text('Compare'),
|
|
|
|
title: new Text('Compare'),
|
|
|
|
onTap: () => {
|
|
|
|
onTap: () => {
|
|
|
|
Provider.of<CompareList>(context, listen: false).addItem(specificationData),
|
|
|
|
Provider.of<CompareList>(context, listen: false)
|
|
|
|
|
|
|
|
.addItem(specificationData),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|