Merge branch 'sultan_new_design' into 'development_new_design_2.0'

Sultan new design

See merge request Cloud_Solution/diplomatic-quarter!417
merge-update-with-lab-changes
Sultan khan 4 years ago
commit 23d11c2160

@ -178,7 +178,8 @@ class _NewHomeHealthCareStepThreePageState extends State<NewHomeHealthCareStepTh
context, context,
widget.model.orderId.toString(), widget.model.orderId.toString(),
onClick: () { onClick: () {
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: HomeHealthCarePage)); Navigator.pop(context);
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
}, },
); );
} }

@ -162,15 +162,21 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
TranslationBase.of(context).serviceName + ": ", TranslationBase.of(context).serviceName + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
...List.generate( Column(
widget.model.hhcAllOrderDetail.length, children: [
(index) => Container( ...List.generate(
child: Texts( widget.model.hhcAllOrderDetail.length,
projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), (index) => Container(
fontSize: 13, child: Texts(
bold: false, projectViewModel.isArabic
), ? widget.model.hhcAllOrderDetail[index].descriptionN
), : widget.model.hhcAllOrderDetail[index].description.capitalize(),
fontSize: 13,
bold: false,
),
),
)
],
) )
], ],
) )

@ -121,7 +121,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
TranslationBase.of(context).serviceName + ": ", TranslationBase.of(context).hospital + ": ",
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
Expanded( Expanded(

@ -51,6 +51,8 @@ class _AddMember extends State<AddMember> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: isLoading == true body: isLoading == true
? AppCircularProgressIndicator() ? AppCircularProgressIndicator()
: SingleChildScrollView( : SingleChildScrollView(
@ -69,7 +71,7 @@ class _AddMember extends State<AddMember> {
Expanded( Expanded(
flex: 4, flex: 4,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), PhoneNumberSelectorWidget(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
//MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), //MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
@ -88,24 +90,24 @@ class _AddMember extends State<AddMember> {
], ],
), ),
), ),
// Expanded( Expanded(
// flex: 3, flex: 3,
// child: Column( child: Column(
// mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
// children: <Widget>[ children: <Widget>[
// Row( Row(
// children: <Widget>[ children: <Widget>[
// Expanded( Expanded(
// child: DefaultButton( child: DefaultButton(
// TranslationBase.of(context).add, TranslationBase.of(context).add,
// () => {this.addMember()}, () => {this.addMember()},
// color: isButtonDisabled == true ? Colors.grey : Colors.grey[900], color: isButtonDisabled == true ? Colors.grey : Colors.red[600],
// textColor: Colors.white, textColor: Colors.white,
// )) ))
// ], ],
// ), ),
// ], ],
// )) ))
]), ]),
))); )));
} }

@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart';
class AddFamilyMemberType extends StatelessWidget { class AddFamilyMemberType extends StatelessWidget {
static int loginType = 0; static int loginType = 0;
@ -14,139 +16,204 @@ class AddFamilyMemberType extends StatelessWidget {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.only(bottom: 20, left: 21, right: 21),
child: Column( child: Column(children: [
children: <Widget>[ Expanded(
Expanded( child: ListView(
flex: 6, padding: EdgeInsets.zero,
child: Column( physics: BouncingScrollPhysics(),
// mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
crossAxisAlignment: CrossAxisAlignment.start, SizedBox(height: 12),
children: <Widget>[ HabibLogoWidget(),
Image.asset( SizedBox(height: 50),
'assets/images/habib-logo.png', Text(
height: 80, TranslationBase.of(context).logintypeRadio,
width: 80, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
), ),
Padding( GridView(
padding: EdgeInsets.all(20), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
child: AppText( physics: NeverScrollableScrollPhysics(),
TranslationBase.of(context).registerInfoFamily, padding: EdgeInsets.only(top: 25),
fontSize: SizeConfig.textMultiplier * 3.5, shrinkWrap: true,
textAlign: TextAlign.left, children: [
), getButton(context, TranslationBase.of(context).nationalIdNumber, 'assets/images/new/national_id.svg', 1),
), getButton(context, TranslationBase.of(context).medicalFileNumber, 'assets/images/new/medical_file.svg', 2),
Padding( ],
padding: EdgeInsets.all(20), ),
child: Row( SizedBox(height: 20),
mainAxisAlignment: MainAxisAlignment.center, // RichText(
children: <Widget>[ // text: TextSpan(
Expanded( // text: TranslationBase.of(context).forgotPassword,
child: InkWell( // style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
onTap: () => { // recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())),
AddFamilyMemberType.loginType = 1, // ),
Navigator.of(context) // ),
.pushNamed(ADD_FAMILY_MEMBER) ],
}, ),
child: RoundedContainer( ),
borderColor: Colors.grey, // SizedBox(
showBorder: true, // height: 43,
child: Padding( // width: double.infinity,
padding: EdgeInsets.fromLTRB( // child: FlatButton(
20, 10, 20, 10), // onPressed: () {},
child: Column( // child: Text(
mainAxisAlignment: // TranslationBase.of(context).registerNow,
MainAxisAlignment.center, // style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
children: <Widget>[ // ),
Image.asset( // color: Color(0xffD02127),
'assets/images/id_card_icon.png', // shape: RoundedRectangleBorder(
height: SizeConfig // borderRadius: BorderRadius.circular(6),
.imageSizeMultiplier * // ),
12, // ),
width: SizeConfig // ),
.imageSizeMultiplier * ]),
15, ));
), // body: Padding(
SizedBox( // padding: EdgeInsets.all(20),
height: 20, // child: Column(
), // children: <Widget>[
AppText( // Expanded(
TranslationBase.of(context) // flex: 6,
.idNo, // child: Column(
fontSize: SizeConfig // // mainAxisAlignment: MainAxisAlignment.spaceBetween,
.textMultiplier * // crossAxisAlignment: CrossAxisAlignment.start,
2, // children: <Widget>[
) // Image.asset(
], // 'assets/images/habib-logo.png',
), // height: 80,
)))), // width: 80,
Expanded( // ),
child: InkWell( // Padding(
onTap: () => { // padding: EdgeInsets.all(20),
AddFamilyMemberType.loginType = 2, // child: AppText(
Navigator.of(context) // TranslationBase.of(context).registerInfoFamily,
.pushNamed(ADD_FAMILY_MEMBER) // fontSize: SizeConfig.textMultiplier * 3.5,
}, // textAlign: TextAlign.left,
child: RoundedContainer( // ),
borderColor: Colors.grey, // ),
showBorder: true, // Padding(
child: Padding( // padding: EdgeInsets.all(20),
padding: EdgeInsets.fromLTRB( // child: Row(
25, 10, 25, 10), // mainAxisAlignment: MainAxisAlignment.center,
child: Column( // children: <Widget>[
children: <Widget>[ // Expanded(
Image.asset( // child: InkWell(
'assets/images/my_file_white_icon.png', // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
height: SizeConfig // child: RoundedContainer(
.imageSizeMultiplier * // borderColor: Colors.grey,
12, // showBorder: true,
width: SizeConfig // child: Padding(
.imageSizeMultiplier * // padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
15, // child: Column(
), // mainAxisAlignment: MainAxisAlignment.center,
SizedBox( // children: <Widget>[
height: 20, // Image.asset(
), // 'assets/images/id_card_icon.png',
AppText( // height: SizeConfig.imageSizeMultiplier * 12,
TranslationBase.of(context) // width: SizeConfig.imageSizeMultiplier * 15,
.fileNo, // ),
fontSize: SizeConfig // SizedBox(
.textMultiplier * // height: 20,
2, // ),
) // AppText(
], // TranslationBase.of(context).idNo,
), // fontSize: SizeConfig.textMultiplier * 2,
)))) // )
], // ],
)), // ),
Divider( // )))),
color: Colors.grey, // Expanded(
height: 2, // child: InkWell(
), // onTap: () => {AddFamilyMemberType.loginType = 2, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
]), // child: RoundedContainer(
), // borderColor: Colors.grey,
// Expanded( // showBorder: true,
// flex: 2, // child: Padding(
// child: Column( // padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
// mainAxisAlignment: MainAxisAlignment.end, // child: Column(
// children: <Widget>[ // children: <Widget>[
// Row( // Image.asset(
// children: <Widget>[ // 'assets/images/my_file_white_icon.png',
// Expanded( // height: SizeConfig.imageSizeMultiplier * 12,
// child: DefaultButton( // width: SizeConfig.imageSizeMultiplier * 15,
// TranslationBase.of(context).registerNow, // ),
// () => { // SizedBox(
// Navigator.of(context).pushNamed( // height: 20,
// REGISTER, // ),
// ) // AppText(
// }, // TranslationBase.of(context).fileNo,
// )) // fontSize: SizeConfig.textMultiplier * 2,
// ], // )
// ), // ],
// ], // ),
// )) // ))))
], // ],
))); // )),
// Divider(
// color: Colors.grey,
// height: 2,
// ),
// ]),
// ),
// // Expanded(
// // flex: 2,
// // child: Column(
// // mainAxisAlignment: MainAxisAlignment.end,
// // children: <Widget>[
// // Row(
// // children: <Widget>[
// // Expanded(
// // child: DefaultButton(
// // TranslationBase.of(context).registerNow,
// // () => {
// // Navigator.of(context).pushNamed(
// // REGISTER,
// // )
// // },
// // ))
// // ],
// // ),
// // ],
// // ))
// ],
// )));
}
Widget getButton(BuildContext _context, String _title, String _icon, int _flag) {
return InkWell(
onTap: () {
AddFamilyMemberType.loginType = _flag;
Navigator.of(_context).pushNamed(ADD_FAMILY_MEMBER);
},
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SvgPicture.asset(
_icon,
height: 38,
width: 38,
),
Text(
_title,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),
),
],
),
),
);
} }
} }

@ -80,6 +80,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: widget.isAppbarVisible, isShowAppBar: widget.isAppbarVisible,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
showNewAppBar: true,
showNewAppBarTitle: true,
icon: "assets/images/new/bottom_nav/family_files.svg", icon: "assets/images/new/bottom_nav/family_files.svg",
description: TranslationBase.of(context).familyInfo, description: TranslationBase.of(context).familyInfo,
body: Scaffold( body: Scaffold(
@ -527,28 +529,31 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
var currentLang = await sharedPref.getString(APP_LANGUAGE); var currentLang = await sharedPref.getString(APP_LANGUAGE);
Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true);
result = list.CheckActivationCode.fromJson(result); result = list.CheckActivationCode.fromJson(result);
var familyFile = await sharedPref.getObject(FAMILY_FILE); var familyFile = await sharedPref.getObject(FAMILY_FILE);
result = list.CheckActivationCode.fromJson(result);
var mainUser = await sharedPref.getObject(MAIN_USER); var mainUser = await sharedPref.getObject(MAIN_USER);
var bloodType = await sharedPref.getString(BLOOD_TYPE); var loginType = await sharedPref.getInt(LAST_LOGIN);
this.sharedPref.clear(); this.sharedPref.clear();
if (mainUser["PatientID"] != result.list.patientID) { if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true; result.list.isFamily = true;
} }
this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setString(APP_LANGUAGE, currentLang);
this.sharedPref.setInt(LAST_LOGIN, loginType);
this.sharedPref.setObject(MAIN_USER, mainUser); this.sharedPref.setObject(MAIN_USER, mainUser);
this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
Provider.of<ProjectViewModel>(context, listen: false).user = authenticatedUserObject.user; Provider.of<ProjectViewModel>(context, listen: false).user = authenticatedUserObject.user;
Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user); Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { // await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
}); // });
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()

@ -207,6 +207,6 @@ class RRTPlaceOrderPage extends StatelessWidget {
} }
gotoRRTRoot() { gotoRRTRoot() {
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: ErOptions)); Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
} }
} }

@ -190,6 +190,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
else else
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
}, },
color: acceptTerms ? Colors.red[600] : Colors.grey,
), ),
), ),
], ],

@ -391,14 +391,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
loginWithFingurePrintFace(type, int isActive) async { loginWithFingurePrintFace(type, int isActive) async {
if (isActive == 1 || isActive ==0) { if (isActive == 1 || isActive == 0) {
const iosStrings = const iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
try { try {
authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings); authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings);
} on PlatformException catch (e) { } on PlatformException catch (e) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); AppToast.showErrorToast(message: 'Please enable your Touch or Face ID');
@ -689,36 +687,36 @@ class _ConfirmLogin extends State<ConfirmLogin> {
), ),
); );
return InkWell( // return InkWell(
onTap: () { // onTap: () {
if (_flag == 0) { // if (_flag == 0) {
setState(() { // setState(() {
isMoreOption = true; // isMoreOption = true;
}); // });
} else { // } else {
authenticateUser(4, isActive: _loginIndex); // authenticateUser(4, isActive: _loginIndex);
} // }
}, // },
child: RoundedContainer( // child: RoundedContainer(
height: 150, // height: 150,
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(30, 15, 30, 15), // padding: EdgeInsets.fromLTRB(30, 15, 30, 15),
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
_icon, // _icon,
height: SizeConfig.imageSizeMultiplier * 13, // height: SizeConfig.imageSizeMultiplier * 13,
width: SizeConfig.imageSizeMultiplier * 16, // width: SizeConfig.imageSizeMultiplier * 16,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) // Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black)
], // ],
), // ),
))); // )));
} }
// todo 'sikander' optimize this after knowing usage // todo 'sikander' optimize this after knowing usage

@ -59,8 +59,7 @@ class LoginType extends StatelessWidget {
RichText( RichText(
text: TextSpan( text: TextSpan(
text: TranslationBase.of(context).forgotPassword, text: TranslationBase.of(context).forgotPassword,
style: TextStyle( style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())), recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())),
), ),
), ),
@ -88,141 +87,141 @@ class LoginType extends StatelessWidget {
), ),
); );
AppScaffold( // AppScaffold(
appBarTitle: TranslationBase.of(context).login, // appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, // isShowAppBar: true,
isShowDecPage: false, // isShowDecPage: false,
body: SingleChildScrollView( // body: SingleChildScrollView(
child: Container( // child: Container(
padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), // padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
height: SizeConfig.realScreenHeight * .9, // height: SizeConfig.realScreenHeight * .9,
width: SizeConfig.realScreenWidth, // width: SizeConfig.realScreenWidth,
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
flex: 4, // flex: 4,
child: Column( // child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, // // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/DQ/logo.png', // 'assets/images/DQ/logo.png',
height: 90, // height: 90,
width: 90, // width: 90,
), // ),
AppText( // AppText(
TranslationBase.of(context).logintypeRadio, // TranslationBase.of(context).logintypeRadio,
fontSize: SizeConfig.textMultiplier * 3.5, // fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.start, // textAlign: TextAlign.start,
marginBottom: 20.0, // marginBottom: 20.0,
marginTop: 20.0, // marginTop: 20.0,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
LoginType.loginType = 1, // LoginType.loginType = 1,
Navigator.of(context).push(FadePage(page: Login())), // Navigator.of(context).push(FadePage(page: Login())),
}, // },
child: RoundedContainer( // child: RoundedContainer(
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(20, 10, 20, 10), // padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/id_card_icon.png', // 'assets/images/id_card_icon.png',
height: SizeConfig.imageSizeMultiplier * 12, // height: SizeConfig.imageSizeMultiplier * 12,
width: SizeConfig.imageSizeMultiplier * 15, // width: SizeConfig.imageSizeMultiplier * 15,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
AppText( // AppText(
TranslationBase.of(context).idNo, // TranslationBase.of(context).idNo,
fontSize: SizeConfig.textMultiplier * 2, // fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
], // ],
), // ),
)))), // )))),
Expanded( // Expanded(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
LoginType.loginType = 2, // LoginType.loginType = 2,
Navigator.of(context).push(FadePage(page: Login())), // Navigator.of(context).push(FadePage(page: Login())),
}, // },
child: RoundedContainer( // child: RoundedContainer(
borderColor: Colors.grey, // borderColor: Colors.grey,
showBorder: true, // showBorder: true,
child: Padding( // child: Padding(
padding: EdgeInsets.fromLTRB(25, 10, 25, 10), // padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
child: Column( // child: Column(
children: <Widget>[ // children: <Widget>[
Image.asset( // Image.asset(
'assets/images/my_file_white_icon.png', // 'assets/images/my_file_white_icon.png',
height: SizeConfig.imageSizeMultiplier * 12, // height: SizeConfig.imageSizeMultiplier * 12,
width: SizeConfig.imageSizeMultiplier * 15, // width: SizeConfig.imageSizeMultiplier * 15,
), // ),
SizedBox( // SizedBox(
height: 20, // height: 20,
), // ),
AppText( // AppText(
TranslationBase.of(context).fileNo, // TranslationBase.of(context).fileNo,
fontSize: SizeConfig.textMultiplier * 2, // fontSize: SizeConfig.textMultiplier * 2,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
], // ],
), // ),
)))) // ))))
], // ],
), // ),
SizedBox( // SizedBox(
height: 25, // height: 25,
), // ),
Divider( // Divider(
color: Colors.grey, // color: Colors.grey,
height: 2, // height: 2,
), // ),
Center( // Center(
child: InkWell( // child: InkWell(
onTap: () => { // onTap: () => {
Navigator.of(context).push(FadePage(page: ForgotPassword())), // Navigator.of(context).push(FadePage(page: ForgotPassword())),
}, // },
child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) // child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true)))
]), // ]),
), // ),
Expanded( // Expanded(
flex: 1, // flex: 1,
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ // children: <Widget>[
Divider( // Divider(
color: Colors.grey, // color: Colors.grey,
height: 2, // height: 2,
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
child: DefaultButton( // child: DefaultButton(
TranslationBase.of(context).registerNow, // TranslationBase.of(context).registerNow,
() => { // () => {
Navigator.of(context).push(FadePage(page: Register())), // Navigator.of(context).push(FadePage(page: Register())),
}, // },
)), // )),
], // ],
), // ),
], // ],
)) // ))
], // ],
)))); // ))));
} }
Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { Widget getButton(BuildContext _context, String _title, String _icon, int _flag) {

@ -232,7 +232,7 @@ class FamilyFilesProvider with ChangeNotifier {
var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER));
request['PatientOutSA'] = currentUser.outSA; //? 1 : 0; request['PatientOutSA'] = currentUser.outSA; //? 1 : 0;
request['LoginType'] = await sharedPref.getInt(LAST_LOGIN); request['LoginType'] = await sharedPref.getInt(LAST_LOGIN) ?? 1;
request['MobileNo'] = currentUser.mobileNumber[0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString(); request['MobileNo'] = currentUser.mobileNumber[0].toString() == "0" ? currentUser.mobileNumber.toString() : '0' + currentUser.mobileNumber.toString();
request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber']; request['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber'];
request['SearchType'] = 2; request['SearchType'] = 2;

Loading…
Cancel
Save