Merge branch 'Fatima-New-Design' into 'development_new_design_2.0'

Fatima new design

See merge request Cloud_Solution/diplomatic-quarter!535
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 13a07ea7ae

@ -31,7 +31,8 @@ class _ProductCheckTypeWidgetState extends State<ProductCheckTypeWidget> {
? widget.model.wishListList[index].product.namen
: widget.model.wishListList[index].product.name,
productPrice: widget.model.wishListList[index].subtotal,
productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
// productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
productRate: widget.model.wishListList[index].product.approvedRatingSum.toDouble(),
approvedTotalReviews:widget.model.wishListList[index].product.approvedTotalReviews,
productImage: widget.model.wishListList[index].product.images[0].src,
productID: widget.model.wishListList[index].product.id,

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
class AvailabilityInfo extends StatelessWidget {
final ProductDetailViewModel previousModel;
@ -49,7 +51,9 @@ class AvailabilityInfo extends StatelessWidget {
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {},
onPressed: () {
MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].latitude), previousModel.productLocationService[index].locationDescription);
},
),
),
Expanded(
@ -57,7 +61,9 @@ class AvailabilityInfo extends StatelessWidget {
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {},
onPressed: () {
launch("tel://" + previousModel.productLocationService[index].phoneNumber);
},
),
),
],

@ -288,10 +288,20 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
product: widget.product,
previousModel: model,
)
: isAvailability
: isAvailability && widget.product.stockAvailability != "Out of stock"
? AvailabilityInfo(
previousModel: model
)
: isAvailability && widget.product.stockAvailability == "Out of stock"
? Container(
// padding: EdgeInsets.all(15),
padding: EdgeInsets.fromLTRB(15,15,15,20),
margin: EdgeInsets.only(bottom: 20),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).noLocationAvailable,
),
)
: Container(),
],
),

@ -32,9 +32,11 @@ class ReviewsInfo extends StatelessWidget {
children: [
Expanded(
child: Container(
child: Text(
previousModel.productDetailService[0].reviews[index].customer.firstName.toString() + " "
+ previousModel.productDetailService[0].reviews[index].customer.lastName.toString(),
child: Text(previousModel.productDetailService[0].reviews[index].customer.firstName != null
&& previousModel.productDetailService[0].reviews[index].customer.firstName != null
? previousModel.productDetailService[0].reviews[index].customer.firstName.toString() + " "
+ previousModel.productDetailService[0].reviews[index].customer.lastName.toString()
:"",
// previousModel.productDetailService[0]
// .reviews[index].customerId
// .toString(),

Loading…
Cancel
Save