|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/pharmacy/order/ProductReview.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
class productTile extends StatelessWidget {
|
|
|
|
|
@ -54,6 +56,7 @@ class productTile extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return Container(
|
|
|
|
|
height: 180,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
@ -90,7 +93,16 @@ class productTile extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
child: Align(
|
|
|
|
|
child: projectViewModel
|
|
|
|
|
.isArabic ? Align(
|
|
|
|
|
alignment: Alignment.topRight,
|
|
|
|
|
child: RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
text: productName,
|
|
|
|
|
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
): Align(
|
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
|
child: RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
@ -102,7 +114,17 @@ class productTile extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
child: Align(
|
|
|
|
|
child: projectViewModel
|
|
|
|
|
.isArabic ? Align(
|
|
|
|
|
alignment: Alignment.topRight,
|
|
|
|
|
child: RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
text: 'SAR $productPrice',
|
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
:Align(
|
|
|
|
|
alignment: Alignment.topLeft,
|
|
|
|
|
child: RichText(
|
|
|
|
|
text: TextSpan(
|
|
|
|
|
|