fix product tile

merge-update-with-lab-changes
Mohammad Aljammal 4 years ago
parent cfe9e35c38
commit 8ecd4a24d8

@ -13,16 +13,16 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs // Pharmacy Production URLs
// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';

@ -672,7 +672,7 @@ class _PharmacyPageState extends State<PharmacyPage> {
), ),
), ),
Container( Container(
height: MediaQuery.of(context).size.height / 4 + 20, height: MediaQuery.of(context).size.height / 4 + 22,
child: ListView.builder( child: ListView.builder(
itemBuilder: (ctx, i) => itemBuilder: (ctx, i) =>
ProductTileItem(model.bestSellerProduct[i]), ProductTileItem(model.bestSellerProduct[i]),

@ -52,16 +52,14 @@ class ProductTileItem extends StatelessWidget {
return InkWell( return InkWell(
onTap: () => productOnClick(context), onTap: () => productOnClick(context),
splashColor: Theme.of(context).primaryColor, splashColor: Theme.of(context).primaryColor,
child: Card(
elevation: 2,
shape: Border(right: BorderSide(color: Colors.grey.shade300, width: 1)),
margin: EdgeInsets.symmetric(
horizontal: 8,
vertical: 0,
),
child: Container( child: Container(
margin: EdgeInsets.all(7),
decoration: BoxDecoration(
border:Border.all(color: Colors.grey.shade300,width: 0.5),
borderRadius: BorderRadius.circular(8)
),
padding: EdgeInsets.symmetric(horizontal: 4), padding: EdgeInsets.symmetric(horizontal: 4),
width: MediaQuery.of(context).size.width / 3, width: MediaQuery.of(context).size.width / 2.8,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -92,16 +90,21 @@ class ProductTileItem extends StatelessWidget {
borderRadius: borderRadius:
BorderRadius.only(topLeft: Radius.circular(6)), BorderRadius.only(topLeft: Radius.circular(6)),
), ),
child: item.rxMessage != null ? Texts( child: item.rxMessage != null
projectProvider.isArabic ? item.rxMessagen : item.rxMessage, ? Texts(
projectProvider.isArabic
? item.rxMessagen
: item.rxMessage,
color: Colors.white, color: Colors.white,
regular: true, regular: true,
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
): Texts(""), )
: Texts(""),
) )
], ],
), ),
SizedBox(height: 8,),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: 6, horizontal: 6,
@ -120,7 +123,7 @@ class ProductTileItem extends StatelessWidget {
padding: const EdgeInsets.only(top: 4, bottom: 4), padding: const EdgeInsets.only(top: 4, bottom: 4),
child: Texts( child: Texts(
"SAR ${item.price}", "SAR ${item.price}",
bold: true, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
), ),
@ -135,19 +138,13 @@ class ProductTileItem extends StatelessWidget {
: 0, : 0,
forceStars: true), forceStars: true),
), ),
/*Texts(
"(${item.approvedTotalReviews})",
regular: true,
fontSize: 10,
fontWeight: FontWeight.w400,
),*/
], ],
), ),
], ],
), ),
)
],
), ),
SizedBox(height: 5,),
],
), ),
), ),
); );

@ -30,7 +30,7 @@ class StarRating extends StatelessWidget {
) )
), ),
if (totalCount!=null) if (totalCount!=null)
SizedBox(width: 9.0), SizedBox(width: 5.0),
if (totalCount!=null) if (totalCount!=null)
Texts("("+totalCount.toString()+")", style: "overline", color: Colors.grey[400],) Texts("("+totalCount.toString()+")", style: "overline", color: Colors.grey[400],)
] ]

Loading…
Cancel
Save