merge-update-with-lab-changes
haroon amjad 4 years ago
parent fb6183a48b
commit 777d88be30

@ -76,7 +76,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
children: [ children: [
PharmacyPage(), PharmacyPage(),
PharmacyCategorisePage(), PharmacyCategorisePage(),
PharmacyProfilePage(), PharmacyProfilePage(moveToOrder: false),
CartOrderPage(changeTab: changeCurrentTab), CartOrderPage(changeTab: changeCurrentTab),
], ],
), ),

@ -1009,11 +1009,7 @@ class _OrderPageState extends State<OrderPage> with SingleTickerProviderStateMix
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: OrderDetailsPage(orderModel: cancelledOrderList[index]))).then((value) { Navigator.push(context, FadePage(page: OrderDetailsPage(orderModel: cancelledOrderList[index])));
model.getOrder(widget.customerID, widget.customerGUID, pageID).then((value) {
getCancelledOrder(model);
});
});
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -29,6 +29,10 @@ import 'package:flutter_svg/flutter_svg.dart';
dynamic languageID; dynamic languageID;
class PharmacyProfilePage extends StatefulWidget { class PharmacyProfilePage extends StatefulWidget {
final bool moveToOrder;
PharmacyProfilePage({@required this.moveToOrder});
@override @override
_ProfilePageState createState() => _ProfilePageState(); _ProfilePageState createState() => _ProfilePageState();
} }
@ -89,17 +93,20 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
getLanguageID(); getLanguageID();
super.initState(); super.initState();
getUser(); getUser();
if (widget.moveToOrder) {
Navigator.push(context, FadePage(page: OrderPage(customerID: customerId, customerGUID: customerGUID)));
}
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<OrderModelViewModel>( return BaseView<OrderModelViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); // var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); // var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
model.getOrder(customerId, customerGUID, page_id); // model.getOrder(customerId, customerGUID, page_id);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
}, },
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
appBarTitle: TranslationBase.of(context).myAccount, appBarTitle: TranslationBase.of(context).myAccount,
@ -220,9 +227,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
Text( Text(
TranslationBase.of(context).lakum, TranslationBase.of(context).lakum,
style: TextStyle( style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold),
fontSize: 13.0,
fontWeight: FontWeight.bold),
), ),
], ],
), ),
@ -231,8 +236,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: WishlistPage()));
FadePage(page: WishlistPage()));
}, },
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -258,8 +262,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: MyReviewsPage()));
FadePage(page: MyReviewsPage()));
}, },
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -304,9 +307,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase.of(context).myAccount, TranslationBase.of(context).myAccount,
style: TextStyle( style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
fontSize: 16.0,
fontWeight: FontWeight.bold),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -317,10 +318,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: HomePrescriptionsPage()));
context,
FadePage(
page: HomePrescriptionsPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -333,8 +331,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 15, width: 15,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).myPrescription,
.myPrescription,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -351,15 +348,11 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: ComparePage()));
FadePage(page: ComparePage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset('assets/images/pharmacy/compare.png', width: 35, height: 35),
'assets/images/pharmacy/compare.png',
width: 35,
height: 35),
SizedBox( SizedBox(
width: 15, width: 15,
), ),
@ -381,10 +374,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: HomePrescriptionsPage()));
context,
FadePage(
page: HomePrescriptionsPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -397,8 +387,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 20, width: 20,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).medicationsRefill,
.medicationsRefill,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -415,8 +404,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: MyFamily()));
context, FadePage(page: MyFamily()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -446,10 +434,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: PharmacyAddressesPage()));
context,
FadePage(
page: PharmacyAddressesPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -462,8 +447,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 20, width: 20,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).shippingAddresses,
.shippingAddresses,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -480,10 +464,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: PharmacyTermsConditions()));
context,
FadePage(
page: PharmacyTermsConditions()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -496,8 +477,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 10, width: 10,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).conditionsHMG,
.conditionsHMG,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -514,15 +494,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId)));
context,
FadePage(
page: LakumTermsConditions(
this.identificationNo,
this.firstName,
this.lastName,
this.mobileNo,
this.languageId)));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -537,8 +509,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 10, width: 10,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).conditions,
.conditions,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -569,9 +540,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase.of(context).reachUs, TranslationBase.of(context).reachUs,
style: TextStyle( style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
fontSize: 16.0,
fontWeight: FontWeight.bold),
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -582,8 +551,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: LiveChatPage()));
FadePage(page: LiveChatPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -611,8 +579,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context, FadePage(page: FindUsPage()));
FadePage(page: FindUsPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
@ -625,8 +592,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
width: 20, width: 20,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).ourLocations,
.ourLocations,
style: TextStyle(fontSize: 13.0), style: TextStyle(fontSize: 13.0),
), ),
], ],

@ -58,8 +58,8 @@ class ProductDetailService extends BaseService {
_stockAvailability = response['products'][0]['stock_availability']; _stockAvailability = response['products'][0]['stock_availability'];
_stockAvailabilityn = response['products'][0]['stock_availabilityn']; _stockAvailabilityn = response['products'][0]['stock_availabilityn'];
// _isStockAvailable = response['products'][0]['IsStockAvailable']; _isStockAvailable = response['products'][0]['IsStockAvailable'];
_isStockAvailable = _stockAvailability == "In stock" ? true : false; // _isStockAvailable = _stockAvailability == "In stock" ? true : false;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

Loading…
Cancel
Save