Lakum & other fixes

merge-requests/477/head
haroon amjad 4 years ago
parent f029aaa1c6
commit e82b8d4439

@ -116,8 +116,8 @@ class BaseAppClient {
// body['IdentificationNo'] = 1009199553; // body['IdentificationNo'] = 1009199553;
// body['MobileNo'] = "966545156035"; // body['MobileNo'] = "966545156035";
body['PatientID'] = 1018977; // body['PatientID'] = 1018977;
body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);

File diff suppressed because one or more lines are too long

@ -48,18 +48,18 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
return BaseView<LacumRegistrationViewModel>( return BaseView<LacumRegistrationViewModel>(
builder: (_, model, wi) => AppScaffold( builder: (_, model, wi) => AppScaffold(
appBarTitle: appBarTitle: "${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}",
"${TranslationBase.of(context).register} ${TranslationBase.of(context).lakum}",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,
isPharmacy: true,
showPharmacyCart: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
width: double.infinity, width: double.infinity,
child: SingleChildScrollView( child: SingleChildScrollView(
child: SizedBox( child: SizedBox(
height: height: mediaQuery.size.height - 60 - mediaQuery.padding.top,
mediaQuery.size.height - 60 - mediaQuery.padding.top,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -130,35 +130,26 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context).prefferedLanguage,
.prefferedLanguage,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Color(0xff8a8a8a), color: Color(0xff8a8a8a),
), ),
InkWell( InkWell(
onTap: () { onTap: () {
RadioGroupDialog dialog = RadioGroupDialog dialog = new RadioGroupDialog(
new RadioGroupDialog( context: context,
context: context, title: TranslationBase.of(context).prefferedLanguage,
title: TranslationBase.of(context) okText: TranslationBase.of(context).confirm,
.prefferedLanguage, cancelText: TranslationBase.of(context).cancel_nocaps,
okText: list: languages,
TranslationBase.of(context) okFunction: (selectedValue) {
.confirm, setState(() {
cancelText: selectedLanguage = selectedValue;
TranslationBase.of(context) });
.cancel_nocaps, print("selectedLanguage = ${selectedValue.name}");
list: languages, },
okFunction: (selectedValue) { cancelFunction: () => {});
setState(() {
selectedLanguage =
selectedValue;
});
print(
"selectedLanguage = ${selectedValue.name}");
},
cancelFunction: () => {});
showDialog( showDialog(
barrierDismissible: false, barrierDismissible: false,
context: context, context: context,
@ -170,11 +161,8 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
child: TextField( child: TextField(
enabled: false, enabled: false,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: suffixIcon: Icon(Icons.arrow_drop_down),
Icon(Icons.arrow_drop_down), hintText: selectedLanguage == null ? "${TranslationBase.of(context).prefferedLanguage}" : "${selectedLanguage.name}",
hintText: selectedLanguage == null
? "${TranslationBase.of(context).prefferedLanguage}"
: "${selectedLanguage.name}",
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 16, fontSize: 16,
color: Colors.black, color: Colors.black,
@ -192,12 +180,10 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
), ),
Container( Container(
color: Colors.green, color: Colors.green,
margin: EdgeInsets.all(8), margin: EdgeInsets.all(40),
child: BorderedButton( child: BorderedButton(
TranslationBase.of(context).register, TranslationBase.of(context).register,
backgroundColor: canSubmit backgroundColor: canSubmit ? Color(0xff339933) : Color(0xff99cc99),
? Color(0xff339933)
: Color(0xff99cc99),
textColor: Colors.white, textColor: Colors.white,
fontSize: 16, fontSize: 16,
hPadding: 8, hPadding: 8,
@ -208,18 +194,13 @@ class _LakumRegistrationPageState extends State<LakumRegistrationPage> {
context, context,
FadePage( FadePage(
page: LakumTermsConditions( page: LakumTermsConditions(
widget widget.patientIdentificationNo, _firstNameController.text, _lastNameController.text, _mobileNumberController.text, selectedLanguage.id)))
.patientIdentificationNo, .then(
_firstNameController.text, (status) => {
_lastNameController.text, if (status == 200) {Navigator.pop(context, "")}
_mobileNumberController // back to previous page
.text, },
selectedLanguage.id))) );
.then((status) => {
if (status == 200)
{Navigator.pop(context, "")}
// back to previous page
});
} }
: null, : null,
), ),

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PointsAmountPerYear.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-registration-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-setting-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-setting-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-transfer-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-points-year-page.dart';
@ -10,278 +12,230 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'lacum-activitaion-vida-page.dart'; import 'lacum-activitaion-vida-page.dart';
class LakumMainPage extends StatelessWidget { class LakumMainPage extends StatelessWidget {
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
projectViewModel = Provider.of(context);
return BaseView<LacumViewModel>( return BaseView<LacumViewModel>(
onModelReady: (model) => model.getLacumData(), onModelReady: (model) async {
builder: (_, model, wi) => AppScaffold( await model.getLacumData();
appBarTitle: TranslationBase.of(context).lakum, if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) {
isShowAppBar: true, navigateToLakumRegister(context);
isPharmacy: true, } else {
isShowDecPage: false, if (model.lacumInformation.status == "Hold") {
backgroundColor: Colors.white, Navigator.pushReplacement(context, FadePage(page: LakumActivationVidaPage()));
baseViewModel: model, }
appBarIcons: _buildAppBarICons(context, model), }
// preferredSize: mediaQuery.size.height * 0.20, },
body: Container( builder: (_, model, wi) => AppScaffold(
width: double.infinity, appBarTitle: TranslationBase.of(context).lakum,
child: SingleChildScrollView( isShowAppBar: true,
child: (model.lacumGroupInformation != null && isPharmacy: true,
model.lacumGroupInformation showPharmacyCart: false,
.lakumInquiryInformationObjVersion != isShowDecPage: false,
null) backgroundColor: Colors.white,
? Column( baseViewModel: model,
children: [ appBarIcons: _buildAppBarICons(context, model),
Stack( // preferredSize: mediaQuery.size.height * 0.20,
children: [ body: Container(
Container( width: double.infinity,
height: mediaQuery.size.height * 0.15, child: SingleChildScrollView(
color: Colors.green, child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null)
), ? Column(
Column( children: [
children: [ Stack(
SizedBox( children: [
height: mediaQuery.size.height * 0.05, Container(
), height: mediaQuery.size.height * 0.15,
Container( color: Colors.green,
width: mediaQuery.size.width * 1, ),
child: LakumBannerWidget( Column(
model, mediaQuery, true)), children: [
], Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)),
) ],
], )
), ],
),
SizedBox(
height: 20,
),
LakumHomeButtons(mediaQuery, model),
SizedBox(
height: 20,
),
Container(
height: 100,
margin: EdgeInsets.symmetric(horizontal: 16),
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null),
SizedBox( SizedBox(
height: 20, width: 8,
), ),
LakumHomeButtons(mediaQuery, model), LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
SizedBox( SizedBox(
height: 20, width: 8,
),
Container(
height: 100,
margin: EdgeInsets.symmetric(horizontal: 16),
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
LacumPointsWidget(
mediaQuery,
1,
TranslationBase.of(context).balance,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalance,
null),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
3,
TranslationBase.of(context).consumed,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
: 0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
4,
TranslationBase.of(context).transferred,
0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPointsAmountPerYear),
],
),
), ),
LacumPointsWidget(
mediaQuery,
3,
TranslationBase.of(context).consumed,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null
? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount)
: 0,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear),
SizedBox( SizedBox(
height: 20, width: 8,
), ),
SizedBox( LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints,
height: 8, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear),
width: double.infinity, ],
child: Container( ),
color: Color(0xffefefef), ),
), SizedBox(
), height: 20,
Container( ),
margin: EdgeInsets.symmetric( SizedBox(
vertical: 16, horizontal: 8), height: 8,
child: Row( width: double.infinity,
mainAxisAlignment: child: Container(
MainAxisAlignment.spaceBetween, color: Color(0xffefefef),
children: [ ),
Row( ),
children: [ Container(
Image.asset( margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
"assets/images/pharmacy_module/lakum/expired_icon.png", child: Row(
fit: BoxFit.fill, mainAxisAlignment: MainAxisAlignment.spaceBetween,
width: 25, children: [
height: 25, Row(
), children: [
Padding( Image.asset(
padding: "assets/images/pharmacy_module/lakum/expired_icon.png",
EdgeInsets.symmetric(horizontal: 8), fit: BoxFit.fill,
child: Texts( width: 25,
"Expired", height: 25,
fontSize: 14, ),
), Padding(
) padding: EdgeInsets.symmetric(horizontal: 8),
], child: Texts(
), "Expired",
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points",
fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
], )
), ],
), ),
SizedBox( Texts(
height: 2, "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.expiredPoints} Points",
width: double.infinity, fontWeight: FontWeight.bold,
child: Container( fontSize: 14,
color: Color(0xffefefef),
),
), ),
Container( ],
margin: EdgeInsets.symmetric( ),
vertical: 16, horizontal: 8), ),
child: Row( SizedBox(
mainAxisAlignment: height: 2,
MainAxisAlignment.spaceBetween, width: double.infinity,
children: [ child: Container(
Row( color: Color(0xffefefef),
children: [ ),
Image.asset( ),
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png", Container(
fit: BoxFit.fill, margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
width: 20, child: Row(
height: 25, mainAxisAlignment: MainAxisAlignment.spaceBetween,
), children: [
Padding( Row(
padding: children: [
EdgeInsets.symmetric(horizontal: 8), Image.asset(
child: Texts( "assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
"Waiting gained", fit: BoxFit.fill,
fontSize: 14, width: 20,
), height: 25,
) ),
], Padding(
), padding: EdgeInsets.symmetric(horizontal: 8),
Texts( child: Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points", "Waiting gained",
fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
], )
), ],
), ),
SizedBox( Texts(
height: 2, "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points",
width: double.infinity, fontWeight: FontWeight.bold,
child: Container( fontSize: 14,
color: Color(0xffefefef),
),
), ),
Container( ],
margin: EdgeInsets.symmetric( ),
vertical: 16, horizontal: 8), ),
child: Row( SizedBox(
mainAxisAlignment: height: 2,
MainAxisAlignment.spaceBetween, width: double.infinity,
children: [ child: Container(
Row( color: Color(0xffefefef),
children: [ ),
Image.asset( ),
"assets/images/pharmacy_module/lakum/will_be_expired_icon.png", Container(
fit: BoxFit.fill, margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
width: 25, child: Row(
height: 25, mainAxisAlignment: MainAxisAlignment.spaceBetween,
), children: [
Padding( Row(
padding: children: [
EdgeInsets.symmetric(horizontal: 8), Image.asset(
child: Texts( "assets/images/pharmacy_module/lakum/will_be_expired_icon.png",
"Will Be Expired", fit: BoxFit.fill,
fontSize: 14, width: 25,
), height: 25,
) ),
], Padding(
), padding: EdgeInsets.symmetric(horizontal: 8),
Texts( child: Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points", "Will Be Expired",
fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
), ),
], )
), ],
), ),
SizedBox( Texts(
height: 2, "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsWillBeExpired} Points",
width: double.infinity, fontWeight: FontWeight.bold,
child: Container( fontSize: 14,
color: Color(0xffefefef),
),
), ),
], ],
) ),
: Container(), ),
), SizedBox(
), height: 2,
)); width: double.infinity,
child: Container(
color: Color(0xffefefef),
),
),
],
)
: Container(),
),
),
),
);
}
navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo)));
} }
} }
@ -291,12 +245,7 @@ List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
icon: Icon(Icons.settings), icon: Icon(Icons.settings),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
context,
FadePage(
page: LakumSettingPage(
model.lacumInformation, model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
}, },
), ),
]; ];
@ -318,9 +267,7 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Account activate click"); print("Account activate click");
Navigator.push( Navigator.push(context, FadePage(page: LakumActivationVidaPage())).then((result) => {model.getLacumGroupData()});
context, FadePage(page: LakumActivationVidaPage()))
.then((result) => {model.getLacumGroupData()});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
@ -363,12 +310,7 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
print("Lacum transfer click"); print("Lacum transfer click");
Navigator.push( Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
context,
FadePage(
page: LacumTransferPage(model.lacumInformation,
model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
@ -419,8 +361,7 @@ class LacumPointsWidget extends StatelessWidget {
Color titleColor; Color titleColor;
final List<PointsAmountPerYear> pointsAmountPerYear; final List<PointsAmountPerYear> pointsAmountPerYear;
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) {
this.point, this.pointsAmountPerYear) {
if (pointType == 1) { if (pointType == 1) {
titleColor = Color(0xffefefef); titleColor = Color(0xffefefef);
} else if (pointType == 2) { } else if (pointType == 2) {
@ -438,8 +379,7 @@ class LacumPointsWidget extends StatelessWidget {
onTap: () { onTap: () {
if (pointType != 1) { if (pointType != 1) {
if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) { if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) {
Navigator.push(context, Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else { } else {
// show snackBar No Details Points are there // show snackBar No Details Points are there
} }

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/login/welcome.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/compare.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/my_reviews.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-terms-conditions-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-conditions-page.dart';
@ -98,7 +99,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
isPharmacy: true, isPharmacy: true,
body: user != null body: user != null
? Container( ? Container(
color: Colors.white, color: Colors.white,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -123,12 +124,8 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Column(children: <Widget>[ Column(children: <Widget>[
Row(children: <Widget>[ Row(children: <Widget>[
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).welcome,
.welcome, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold, color: Colors.grey),
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.bold,
color: Colors.grey),
), ),
]), ]),
SizedBox( SizedBox(
@ -136,16 +133,8 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
Row(children: <Widget>[ Row(children: <Widget>[
Text( Text(
languageID == "ar" languageID == "ar" ? user.firstNameN.toString() + " " + user.lastNameN.toString() : user.firstName.toString() + " " + user.lastName.toString(),
? user.firstNameN.toString() + style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold),
" " +
user.lastNameN.toString()
: user.firstName.toString() +
" " +
user.lastName.toString(),
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.bold),
), ),
]), ]),
]), ]),
@ -172,15 +161,10 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
if (customerId == null) { if (customerId == null) {
AppToast.showErrorToast( AppToast.showErrorToast(message: "Customer not found");
message: "Customer not found");
return; return;
} }
Navigator.push( Navigator.push(context, FadePage(page: OrderPage(customerID: customerId)));
context,
FadePage(
page: OrderPage(
customerID: customerId)));
}, },
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -207,8 +191,10 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push(context, if (customerId == null || customerId == '')
FadePage(page: LakumMainPage())); Navigator.push(context, FadePage(page: LakumActivationVidaPage()));
else
Navigator.push(context, FadePage(page: LakumMainPage()));
}, },
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -222,9 +208,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),
), ),
], ],
), ),
@ -233,9 +217,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(context, FadePage(page: WishlistPage()));
context,
FadePage(page: WishlistPage()));
}, },
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -261,8 +243,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>[
@ -307,9 +288,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,
@ -320,10 +299,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>[
@ -336,8 +312,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,
), ),
@ -354,15 +329,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,
), ),
@ -384,10 +355,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>[
@ -400,8 +368,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,
), ),
@ -418,8 +385,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>[
@ -449,10 +415,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>[
@ -465,8 +428,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,
), ),
@ -483,10 +445,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>[
@ -499,8 +458,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,
), ),
@ -517,15 +475,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>[
@ -540,8 +490,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,
), ),
@ -572,9 +521,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,
@ -585,8 +532,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>[
@ -614,8 +560,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>[
@ -628,8 +573,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),
), ),
], ],

@ -16,7 +16,7 @@ dependencies:
sdk: flutter sdk: flutter
intl: ^0.16.0 intl: ^0.16.0
# web view # web view
webview_flutter: ^0.3.24 webview_flutter: ^1.0.7
# http client # http client
http: ^0.12.1 http: ^0.12.1
connectivity: ^0.4.9+3 connectivity: ^0.4.9+3
@ -40,7 +40,7 @@ dependencies:
device_info: ^0.4.2+4 device_info: ^0.4.2+4
# Flutter Html View # Flutter Html View
flutter_html: 1.0.2 flutter_html: ^1.2.0
# Native # Native
flutter_device_type: ^0.2.0 flutter_device_type: ^0.2.0
@ -59,7 +59,7 @@ dependencies:
# Icons # Icons
font_awesome_flutter: any font_awesome_flutter: any
cupertino_icons: ^0.1.3 cupertino_icons: ^1.0.0
# Image Attachments # Image Attachments
image_picker: ^0.6.7+1 image_picker: ^0.6.7+1
@ -97,7 +97,7 @@ dependencies:
syncfusion_flutter_calendar: ^18.4.49 syncfusion_flutter_calendar: ^18.4.49
# SVG Images # SVG Images
flutter_svg: ^0.18.0 flutter_svg: ^0.19.0
#Calendar Events #Calendar Events
manage_calendar_events: ^1.0.2 manage_calendar_events: ^1.0.2
@ -147,7 +147,7 @@ dependencies:
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9 enum_to_string: ^1.0.9
wakelock: ^0.1.4 wakelock: ^0.2.1+1
after_layout: ^1.0.7 after_layout: ^1.0.7
twilio_programmable_video: ^0.6.2 twilio_programmable_video: ^0.6.2
cached_network_image: ^2.4.1 cached_network_image: ^2.4.1

Loading…
Cancel
Save