FAMILY FILES

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent fed33ae4dc
commit 76e16594ba

@ -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,11 +162,15 @@ 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),
), ),
Column(
children: [
...List.generate( ...List.generate(
widget.model.hhcAllOrderDetail.length, widget.model.hhcAllOrderDetail.length,
(index) => Container( (index) => Container(
child: Texts( child: Texts(
projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), projectViewModel.isArabic
? widget.model.hhcAllOrderDetail[index].descriptionN
: widget.model.hhcAllOrderDetail[index].description.capitalize(),
fontSize: 13, fontSize: 13,
bold: false, bold: false,
), ),
@ -175,6 +179,8 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
], ],
) )
], ],
)
],
), ),
), ),
Column( Column(

@ -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(
flex: 6,
child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Image.asset(
'assets/images/habib-logo.png',
height: 80,
width: 80,
),
Padding(
padding: EdgeInsets.all(20),
child: AppText(
TranslationBase.of(context).registerInfoFamily,
fontSize: SizeConfig.textMultiplier * 3.5,
textAlign: TextAlign.left,
),
),
Padding(
padding: EdgeInsets.all(20),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded( Expanded(
child: InkWell( child: ListView(
onTap: () => { padding: EdgeInsets.zero,
AddFamilyMemberType.loginType = 1, physics: BouncingScrollPhysics(),
Navigator.of(context) children: [
.pushNamed(ADD_FAMILY_MEMBER) SizedBox(height: 12),
}, HabibLogoWidget(),
child: RoundedContainer( SizedBox(height: 50),
borderColor: Colors.grey, Text(
showBorder: true, TranslationBase.of(context).logintypeRadio,
child: Padding( style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
padding: EdgeInsets.fromLTRB(
20, 10, 20, 10),
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
children: <Widget>[
Image.asset(
'assets/images/id_card_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
), ),
AppText( GridView(
TranslationBase.of(context) gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9),
.idNo, physics: NeverScrollableScrollPhysics(),
fontSize: SizeConfig padding: EdgeInsets.only(top: 25),
.textMultiplier * shrinkWrap: true,
2, 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),
], ],
), ),
)))), SizedBox(height: 20),
Expanded( // RichText(
child: InkWell( // text: TextSpan(
onTap: () => { // text: TranslationBase.of(context).forgotPassword,
AddFamilyMemberType.loginType = 2, // style: TextStyle(decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12),
Navigator.of(context) // recognizer: TapGestureRecognizer()..onTap = () => Navigator.of(context).push(FadePage(page: ForgotPassword())),
.pushNamed(ADD_FAMILY_MEMBER) // ),
}, // ),
child: RoundedContainer(
borderColor: Colors.grey,
showBorder: true,
child: Padding(
padding: EdgeInsets.fromLTRB(
25, 10, 25, 10),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/my_file_white_icon.png',
height: SizeConfig
.imageSizeMultiplier *
12,
width: SizeConfig
.imageSizeMultiplier *
15,
),
SizedBox(
height: 20,
),
AppText(
TranslationBase.of(context)
.fileNo,
fontSize: SizeConfig
.textMultiplier *
2,
)
], ],
), ),
))))
],
)),
Divider(
color: Colors.grey,
height: 2,
), ),
// SizedBox(
// height: 43,
// width: double.infinity,
// child: FlatButton(
// onPressed: () {},
// child: Text(
// TranslationBase.of(context).registerNow,
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.48),
// ),
// color: Color(0xffD02127),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(6),
// ),
// ),
// ),
]), ]),
), ));
// body: Padding(
// padding: EdgeInsets.all(20),
// child: Column(
// children: <Widget>[
// Expanded( // Expanded(
// flex: 2, // flex: 6,
// child: Column( // child: Column(
// mainAxisAlignment: MainAxisAlignment.end, // // mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[ // children: <Widget>[
// Row( // Image.asset(
// 'assets/images/habib-logo.png',
// height: 80,
// width: 80,
// ),
// Padding(
// padding: EdgeInsets.all(20),
// child: AppText(
// TranslationBase.of(context).registerInfoFamily,
// fontSize: SizeConfig.textMultiplier * 3.5,
// textAlign: TextAlign.left,
// ),
// ),
// Padding(
// padding: EdgeInsets.all(20),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[ // children: <Widget>[
// Expanded( // Expanded(
// child: DefaultButton( // child: InkWell(
// TranslationBase.of(context).registerNow, // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
// () => { // child: RoundedContainer(
// Navigator.of(context).pushNamed( // borderColor: Colors.grey,
// REGISTER, // showBorder: true,
// child: Padding(
// padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Image.asset(
// 'assets/images/id_card_icon.png',
// height: SizeConfig.imageSizeMultiplier * 12,
// width: SizeConfig.imageSizeMultiplier * 15,
// ),
// SizedBox(
// height: 20,
// ),
// AppText(
// TranslationBase.of(context).idNo,
// fontSize: SizeConfig.textMultiplier * 2,
// )
// ],
// ),
// )))),
// Expanded(
// child: InkWell(
// onTap: () => {AddFamilyMemberType.loginType = 2, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)},
// child: RoundedContainer(
// borderColor: Colors.grey,
// showBorder: true,
// child: Padding(
// padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
// child: Column(
// children: <Widget>[
// Image.asset(
// 'assets/images/my_file_white_icon.png',
// height: SizeConfig.imageSizeMultiplier * 12,
// width: SizeConfig.imageSizeMultiplier * 15,
// ),
// SizedBox(
// height: 20,
// ),
// 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