|
|
|
|
@ -281,10 +281,9 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectProvider = Provider.of(context);
|
|
|
|
|
OrderPreviewViewModel model = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
return !(model.cartResponse.shoppingCarts == null ||
|
|
|
|
|
model.cartResponse.shoppingCarts.length == 0)
|
|
|
|
|
return !(widget.model.cartResponse.shoppingCarts == null ||
|
|
|
|
|
widget.model.cartResponse.shoppingCarts.length == 0)
|
|
|
|
|
? Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -374,7 +373,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
"${TranslationBase.of(context).sar} ${(model.cartResponse.subtotalWithVat).toStringAsFixed(2)}",
|
|
|
|
|
"${TranslationBase.of(context).sar} ${(widget.model.cartResponse.subtotalWithVat).toStringAsFixed(2)}",
|
|
|
|
|
fontSize: projectProvider.isArabic ? 12 : 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
@ -392,7 +391,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
"${model.cartResponse.quantityCount} ${TranslationBase.of(context).items}",
|
|
|
|
|
"${widget.model.cartResponse.quantityCount} ${TranslationBase.of(context).items}",
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
@ -404,7 +403,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
|
|
|
|
|
onPressed: isAgree
|
|
|
|
|
// && cart.cartResponse.shoppingCarts[1].product.stockQuantity ==0
|
|
|
|
|
? () => {
|
|
|
|
|
if (model
|
|
|
|
|
if (widget.model
|
|
|
|
|
.isCartItemsOutOfStock())
|
|
|
|
|
{
|
|
|
|
|
// Toast msg
|
|
|
|
|
@ -414,7 +413,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_navigateToAddressPage(model
|
|
|
|
|
_navigateToAddressPage(widget.model
|
|
|
|
|
.user.patientIdentificationNo)
|
|
|
|
|
// Navigator.push(
|
|
|
|
|
// context,
|
|
|
|
|
|