diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart index 794d991f..e07b7d70 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart @@ -178,7 +178,8 @@ class _NewHomeHealthCareStepThreePageState extends State Utils.route(route, equalsTo: HomeHealthCarePage)); + Navigator.pop(context); + Navigator.push(context, FadePage(page: HomeHealthCarePage())); }, ); } diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart index d6e9b353..4a2234c6 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_home_health_care_page.dart @@ -162,15 +162,21 @@ class _NewHomeHealthCarePageState extends State with Tick TranslationBase.of(context).serviceName + ": ", style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), - ...List.generate( - widget.model.hhcAllOrderDetail.length, - (index) => Container( - child: Texts( - projectViewModel.isArabic ? widget.model.hhcAllOrderDetail[index].descriptionN : widget.model.hhcAllOrderDetail[index].description.capitalize(), - fontSize: 13, - bold: false, - ), - ), + Column( + children: [ + ...List.generate( + widget.model.hhcAllOrderDetail.length, + (index) => Container( + child: Texts( + projectViewModel.isArabic + ? widget.model.hhcAllOrderDetail[index].descriptionN + : widget.model.hhcAllOrderDetail[index].description.capitalize(), + fontSize: 13, + bold: false, + ), + ), + ) + ], ) ], ) diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart index 468ab225..b64c5d7d 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/orders_log_details_page.dart @@ -121,7 +121,7 @@ class OrdersLogDetailsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ 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), ), Expanded( diff --git a/lib/pages/DrawerPages/family/add-family-member.dart b/lib/pages/DrawerPages/family/add-family-member.dart index be5c5152..75291ee2 100644 --- a/lib/pages/DrawerPages/family/add-family-member.dart +++ b/lib/pages/DrawerPages/family/add-family-member.dart @@ -51,6 +51,8 @@ class _AddMember extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, body: isLoading == true ? AppCircularProgressIndicator() : SingleChildScrollView( @@ -69,7 +71,7 @@ class _AddMember extends State { Expanded( flex: 4, child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ PhoneNumberSelectorWidget(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 { ], ), ), - // Expanded( - // flex: 3, - // child: Column( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // Row( - // children: [ - // Expanded( - // child: DefaultButton( - // TranslationBase.of(context).add, - // () => {this.addMember()}, - // color: isButtonDisabled == true ? Colors.grey : Colors.grey[900], - // textColor: Colors.white, - // )) - // ], - // ), - // ], - // )) + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).add, + () => {this.addMember()}, + color: isButtonDisabled == true ? Colors.grey : Colors.red[600], + textColor: Colors.white, + )) + ], + ), + ], + )) ]), ))); } diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart index 48773820..533669c7 100644 --- a/lib/pages/DrawerPages/family/add-family_type.dart +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:diplomaticquarterapp/widgets/habib_logo_widget.dart'; class AddFamilyMemberType extends StatelessWidget { static int loginType = 0; @@ -14,139 +16,204 @@ class AddFamilyMemberType extends StatelessWidget { return AppScaffold( appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, body: Padding( - padding: EdgeInsets.all(20), - child: Column( - children: [ - Expanded( - flex: 6, - child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 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: [ - Expanded( - child: InkWell( - onTap: () => { - AddFamilyMemberType.loginType = 1, - Navigator.of(context) - .pushNamed(ADD_FAMILY_MEMBER) - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB( - 20, 10, 20, 10), - child: Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - 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: [ - 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: [ - // Row( - // children: [ - // Expanded( - // child: DefaultButton( - // TranslationBase.of(context).registerNow, - // () => { - // Navigator.of(context).pushNamed( - // REGISTER, - // ) - // }, - // )) - // ], - // ), - // ], - // )) - ], - ))); + padding: EdgeInsets.only(bottom: 20, left: 21, right: 21), + child: Column(children: [ + Expanded( + child: ListView( + padding: EdgeInsets.zero, + physics: BouncingScrollPhysics(), + children: [ + SizedBox(height: 12), + HabibLogoWidget(), + SizedBox(height: 50), + Text( + TranslationBase.of(context).logintypeRadio, + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16), + ), + GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 25), + shrinkWrap: true, + 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), + // RichText( + // text: TextSpan( + // text: TranslationBase.of(context).forgotPassword, + // style: TextStyle(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())), + // ), + // ), + ], + ), + ), + // 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: [ + // Expanded( + // flex: 6, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // 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: [ + // Expanded( + // child: InkWell( + // onTap: () => {AddFamilyMemberType.loginType = 1, Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER)}, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // 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: [ + // 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: [ + // // Row( + // // children: [ + // // 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: [ + 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), + ), + ], + ), + ), + ); } } diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index fd6264ba..a3f67a03 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -80,6 +80,8 @@ class _MyFamily extends State with TickerProviderStateMixin { appBarTitle: TranslationBase.of(context).myFamilyFiles, isShowAppBar: widget.isAppbarVisible, imagesInfo: imagesInfo, + showNewAppBar: true, + showNewAppBarTitle: true, icon: "assets/images/new/bottom_nav/family_files.svg", description: TranslationBase.of(context).familyInfo, body: Scaffold( @@ -527,28 +529,31 @@ class _MyFamily extends State with TickerProviderStateMixin { var currentLang = await sharedPref.getString(APP_LANGUAGE); Provider.of(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true); result = list.CheckActivationCode.fromJson(result); + var familyFile = await sharedPref.getObject(FAMILY_FILE); - result = list.CheckActivationCode.fromJson(result); var mainUser = await sharedPref.getObject(MAIN_USER); - var bloodType = await sharedPref.getString(BLOOD_TYPE); + var loginType = await sharedPref.getInt(LAST_LOGIN); this.sharedPref.clear(); if (mainUser["PatientID"] != result.list.patientID) { result.list.isFamily = true; } + this.sharedPref.setString(APP_LANGUAGE, currentLang); + this.sharedPref.setInt(LAST_LOGIN, loginType); this.sharedPref.setObject(MAIN_USER, mainUser); this.sharedPref.setObject(USER_PROFILE, result.list); this.sharedPref.setObject(FAMILY_FILE, familyFile); this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID); this.sharedPref.setString(TOKEN, result.authenticationTokenID); + await authenticatedUserObject.getUser(getUser: true); Provider.of(context, listen: false).user = authenticatedUserObject.user; Provider.of(context, listen: false).setUser(authenticatedUserObject.user); - await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { - if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); - }); + // await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { + // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); + // }); appointmentRateViewModel .getIsLastAppointmentRatedList() diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart index 8087c5fe..41b4b2fe 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart @@ -207,6 +207,6 @@ class RRTPlaceOrderPage extends StatelessWidget { } gotoRRTRoot() { - Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: ErOptions)); + Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); } } diff --git a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart index c6e56c34..4dbe73a1 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart @@ -190,6 +190,7 @@ class RRTRequestPageState extends State { else AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms); }, + color: acceptTerms ? Colors.red[600] : Colors.grey, ), ), ], diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 2cef4da2..b4336910 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -391,14 +391,12 @@ class _ConfirmLogin extends State { } loginWithFingurePrintFace(type, int isActive) async { - if (isActive == 1 || isActive ==0) { - + if (isActive == 1 || isActive == 0) { const iosStrings = const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID'); try { authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings); - } on PlatformException catch (e) { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: 'Please enable your Touch or Face ID'); @@ -689,36 +687,36 @@ class _ConfirmLogin extends State { ), ); - return InkWell( - onTap: () { - if (_flag == 0) { - setState(() { - isMoreOption = true; - }); - } else { - authenticateUser(4, isActive: _loginIndex); - } - }, - child: RoundedContainer( - height: 150, - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(30, 15, 30, 15), - child: Column( - children: [ - Image.asset( - _icon, - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, - ), - SizedBox( - height: 20, - ), - Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) - ], - ), - ))); + // return InkWell( + // onTap: () { + // if (_flag == 0) { + // setState(() { + // isMoreOption = true; + // }); + // } else { + // authenticateUser(4, isActive: _loginIndex); + // } + // }, + // child: RoundedContainer( + // height: 150, + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(30, 15, 30, 15), + // child: Column( + // children: [ + // Image.asset( + // _icon, + // height: SizeConfig.imageSizeMultiplier * 13, + // width: SizeConfig.imageSizeMultiplier * 16, + // ), + // SizedBox( + // height: 20, + // ), + // Texts(_title, fontSize: SizeConfig.textMultiplier * 2, color: Colors.black) + // ], + // ), + // ))); } // todo 'sikander' optimize this after knowing usage diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 054d11a6..e2e08654 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -59,8 +59,7 @@ class LoginType extends StatelessWidget { RichText( text: TextSpan( text: TranslationBase.of(context).forgotPassword, - style: TextStyle( - decoration: TextDecoration.underline, fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffC9272B), letterSpacing: -0.48, height: 18 / 12), + style: TextStyle(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())), ), ), @@ -88,141 +87,141 @@ class LoginType extends StatelessWidget { ), ); - AppScaffold( - appBarTitle: TranslationBase.of(context).login, - isShowAppBar: true, - isShowDecPage: false, - body: SingleChildScrollView( - child: Container( - padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), - height: SizeConfig.realScreenHeight * .9, - width: SizeConfig.realScreenWidth, - child: Column( - children: [ - Expanded( - flex: 4, - child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/DQ/logo.png', - height: 90, - width: 90, - ), - AppText( - TranslationBase.of(context).logintypeRadio, - fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.start, - marginBottom: 20.0, - marginTop: 20.0, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => { - LoginType.loginType = 1, - Navigator.of(context).push(FadePage(page: Login())), - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(20, 10, 20, 10), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - 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, - fontWeight: FontWeight.bold, - ) - ], - ), - )))), - Expanded( - child: InkWell( - onTap: () => { - LoginType.loginType = 2, - Navigator.of(context).push(FadePage(page: Login())), - }, - child: RoundedContainer( - borderColor: Colors.grey, - showBorder: true, - child: Padding( - padding: EdgeInsets.fromLTRB(25, 10, 25, 10), - child: Column( - children: [ - 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, - fontWeight: FontWeight.bold, - ) - ], - ), - )))) - ], - ), - SizedBox( - height: 25, - ), - Divider( - color: Colors.grey, - height: 2, - ), - Center( - child: InkWell( - onTap: () => { - Navigator.of(context).push(FadePage(page: ForgotPassword())), - }, - child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) - ]), - ), - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Divider( - color: Colors.grey, - height: 2, - ), - SizedBox( - height: 10, - ), - Row( - children: [ - Expanded( - child: DefaultButton( - TranslationBase.of(context).registerNow, - () => { - Navigator.of(context).push(FadePage(page: Register())), - }, - )), - ], - ), - ], - )) - ], - )))); + // AppScaffold( + // appBarTitle: TranslationBase.of(context).login, + // isShowAppBar: true, + // isShowDecPage: false, + // body: SingleChildScrollView( + // child: Container( + // padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), + // height: SizeConfig.realScreenHeight * .9, + // width: SizeConfig.realScreenWidth, + // child: Column( + // children: [ + // Expanded( + // flex: 4, + // child: Column( + // // mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Image.asset( + // 'assets/images/DQ/logo.png', + // height: 90, + // width: 90, + // ), + // AppText( + // TranslationBase.of(context).logintypeRadio, + // fontSize: SizeConfig.textMultiplier * 3.5, + // textAlign: TextAlign.start, + // marginBottom: 20.0, + // marginTop: 20.0, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 1, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + // child: Column( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // 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, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))), + // Expanded( + // child: InkWell( + // onTap: () => { + // LoginType.loginType = 2, + // Navigator.of(context).push(FadePage(page: Login())), + // }, + // child: RoundedContainer( + // borderColor: Colors.grey, + // showBorder: true, + // child: Padding( + // padding: EdgeInsets.fromLTRB(25, 10, 25, 10), + // child: Column( + // children: [ + // 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, + // fontWeight: FontWeight.bold, + // ) + // ], + // ), + // )))) + // ], + // ), + // SizedBox( + // height: 25, + // ), + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // Center( + // child: InkWell( + // onTap: () => { + // Navigator.of(context).push(FadePage(page: ForgotPassword())), + // }, + // child: AppText(TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, marginTop: 20.0, underline: true))) + // ]), + // ), + // Expanded( + // flex: 1, + // child: Column( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // Divider( + // color: Colors.grey, + // height: 2, + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // children: [ + // Expanded( + // child: DefaultButton( + // TranslationBase.of(context).registerNow, + // () => { + // Navigator.of(context).push(FadePage(page: Register())), + // }, + // )), + // ], + // ), + // ], + // )) + // ], + // )))); } Widget getButton(BuildContext _context, String _title, String _icon, int _flag) { diff --git a/lib/services/family_files/family_files_provider.dart b/lib/services/family_files/family_files_provider.dart index cd83f2d9..014ba7b3 100644 --- a/lib/services/family_files/family_files_provider.dart +++ b/lib/services/family_files/family_files_provider.dart @@ -232,7 +232,7 @@ class FamilyFilesProvider with ChangeNotifier { var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER)); 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['PatientMobileNumber'] = currentUser.mobileNumber; //['MobileNumber']; request['SearchType'] = 2;