diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 601d5580..afcc1cb2 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -359,7 +359,7 @@ class _MyAppointmentsState extends State with SingleTickerProvid isLiveCareAppointment: _appointmentResult.isLiveCareAppointment, date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate), isSortByClinic: _isSortByClinic, - appoTime: _appointmentResult.startTime, + appoTime: _appointmentResult.startTime.substring(0, 5), //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate), ); }, diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 9f78797e..85f131c6 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -177,7 +177,6 @@ class _ConfirmLogin extends State { TranslationBase.of(context).lastLoginWith.toCamelCase, style: TextStyle( fontSize: 10, - fontWeight: FontWeight.w600, color: Color(0xff575757), ), @@ -186,7 +185,6 @@ class _ConfirmLogin extends State { " " + getType(user.logInType, context), style: TextStyle( fontSize: 12, - fontWeight: FontWeight.w600, color: Color(0xff2B353E), ), @@ -376,7 +374,9 @@ class _ConfirmLogin extends State { }); } + var tempType; startSMSService(type) { + tempType = type; new SMSOTP( context, type, @@ -507,6 +507,7 @@ class _ConfirmLogin extends State { } checkActivationCode({value}) async { + Navigator.pop(context); GifLoaderDialogUtils.showMyDialog(context); var request = this.getCommonRequest().toJson(); @@ -553,6 +554,7 @@ class _ConfirmLogin extends State { GifLoaderDialogUtils.hideDialog(context); Future.delayed(Duration(seconds: 1), () { AppToast.showErrorToast(message: err); + startSMSService(tempType); }); }); } @@ -670,8 +672,7 @@ class _ConfirmLogin extends State { ), Text( TranslationBase.of(context).verifyThrough + " " + _title, - style: TextStyle( - fontSize: 16, fontWeight: FontWeight.w600, color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: isDisable ? Color(0xff2B353E).withOpacity(0.7) : Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), ), ], ), diff --git a/lib/widgets/others/app_expandable_notifier.dart b/lib/widgets/others/app_expandable_notifier.dart index 0e3babbe..90eb3623 100644 --- a/lib/widgets/others/app_expandable_notifier.dart +++ b/lib/widgets/others/app_expandable_notifier.dart @@ -80,9 +80,9 @@ class _AppExpandableNotifier extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (_title.isNotEmpty) + if (_mainTitle.isNotEmpty) Text( - _title + " " + _subTitle, + _mainTitle, style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.72, height: 23 / 12), ), // Text( diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index cb014d64..54231248 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -150,243 +150,6 @@ class SMSOTP { ], ), ); - - return Container( - color: Colors.white, - height: SizeConfig.realScreenHeight * 0.5, - width: SizeConfig.realScreenWidth, - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - type == 1 ? Image.asset('assets/images/login/103.png') : Image.asset('assets/images/login/104.png'), - Padding( - padding: EdgeInsets.only(top: 5), - child: AppText( - TranslationBase.of(context).pleaseEnterTheVerificationCode + ' XXXXXX' + mobileNo.toString().substring(mobileNo.toString().length - 3), - textAlign: TextAlign.center, - )), - Directionality( - textDirection: TextDirection.ltr, - child: TextFieldPin( - filled: true, - filledColor: Colors.grey[100], - codeLength: 4, - filledAfterTextChange: true, - boxSize: 50, - margin: 10, - borderStyeAfterTextChange: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), - ), - borderStyle: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), - ), - onOtpCallback: (code, isAutofill) => _onOtpCallBack(code, isAutofill), - )), - SizedBox(height: 20), - Padding( - padding: EdgeInsets.only(top: 10), - child: AppText( - TranslationBase.of(context).validationMessage + ' ' + displayTime, - color: Colors.red, - textAlign: TextAlign.center, - )) - ], - )), - ); - }), - ); - - AlertDialog( - title: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - IconButton( - icon: Icon(Icons.close), - onPressed: () { - Navigator.pop(context); - this.onFailure(); - }, - ) - ], - ), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))), - content: StatefulBuilder(builder: (context, setState) { - if (displayTime == '') { - startTimer(setState); - } - - return Container( - color: Colors.white, - height: SizeConfig.realScreenHeight * 0.5, - width: SizeConfig.realScreenWidth, - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - type == 1 ? Image.asset('assets/images/login/103.png') : Image.asset('assets/images/login/104.png'), - Padding( - padding: EdgeInsets.only(top: 5), - child: AppText( - TranslationBase.of(context).pleaseEnterTheVerificationCode + ' XXXXXX' + mobileNo.toString().substring(mobileNo.toString().length - 3), - textAlign: TextAlign.center, - )), - - Directionality( - textDirection: TextDirection.ltr, - child: TextFieldPin( - filled: true, - filledColor: Colors.grey[100], - codeLength: 4, - filledAfterTextChange: true, - boxSize: 50, - margin: 10, - borderStyeAfterTextChange: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), - ), - borderStyle: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.black), - ), - onOtpCallback: (code, isAutofill) => _onOtpCallBack(code, isAutofill), - )), - // Form( - // key: verifyAccountForm, - // child: Padding( - // padding: EdgeInsets.only(top: 20), - // child: Directionality( - // textDirection: TextDirection.ltr, - // child: - // // Row( - // mainAxisAlignment: MainAxisAlignment.spaceAround, - // children: [ - // Container( - - // child: , - // ) - // Container( - // width: SizeConfig.realScreenWidth * 0.15, - // child: TextFormField( - // textInputAction: TextInputAction.next, - // style: buildTextStyle(), - // autofocus: true, - // maxLength: 1, - // controller: digit1, - // textAlign: TextAlign.center, - // keyboardType: TextInputType.number, - // decoration: buildInputDecoration(context), - // onSaved: (val) {}, - // validator: validateCodeDigit, - // onFieldSubmitted: (_) { - // FocusScope.of(context) - // .requestFocus(focusD2); - // }, - // onChanged: (val) { - // if (val.length == 1) { - // FocusScope.of(context) - // .requestFocus(focusD2); - // verifyAccountFormValue['digit1'] = - // val.trim(); - // checkValue(); - // } - // }, - // ), - // ), - // Container( - // width: SizeConfig.realScreenWidth * 0.15, - // child: TextFormField( - // focusNode: focusD2, - // textInputAction: TextInputAction.next, - // maxLength: 1, - // controller: digit2, - // textAlign: TextAlign.center, - // style: buildTextStyle(), - // keyboardType: TextInputType.number, - // decoration: buildInputDecoration(context), - // onSaved: (val) {}, - // onFieldSubmitted: (_) { - // FocusScope.of(context) - // .requestFocus(focusD3); - // }, - // onChanged: (val) { - // if (val.length == 1) { - // FocusScope.of(context) - // .requestFocus(focusD3); - // verifyAccountFormValue['digit2'] = - // val.trim(); - // checkValue(); - // } - // }, - // validator: validateCodeDigit), - // ), - // Container( - // width: SizeConfig.realScreenWidth * 0.15, - // child: TextFormField( - // focusNode: focusD3, - // textInputAction: TextInputAction.next, - // maxLength: 1, - // controller: digit3, - // textAlign: TextAlign.center, - // style: buildTextStyle(), - // keyboardType: TextInputType.number, - // decoration: - // buildInputDecoration(context), - // onSaved: (val) {}, - // onFieldSubmitted: (_) { - // FocusScope.of(context) - // .requestFocus(focusD4); - // }, - // onChanged: (val) { - // if (val.length == 1) { - // FocusScope.of(context) - // .requestFocus(focusD4); - // verifyAccountFormValue['digit3'] = - // val.trim(); - // checkValue(); - // } - // }, - // validator: validateCodeDigit)), - // Container( - // width: SizeConfig.realScreenWidth * 0.15, - // child: TextFormField( - // focusNode: focusD4, - // maxLength: 1, - // textAlign: TextAlign.center, - // style: buildTextStyle(), - // controller: digit4, - // keyboardType: TextInputType.number, - // decoration: - // buildInputDecoration(context), - // onFieldSubmitted: (_) { - // FocusScope.of(context) - // .requestFocus(focusD4); - // }, - // onChanged: (val) { - // if (val.length == 1) { - // verifyAccountFormValue['digit4'] = - // val.trim(); - // checkValue(); - // } - // }, - // validator: validateCodeDigit)), - // ], - //)), - //), - //), - SizedBox(height: 20), - Padding( - padding: EdgeInsets.only(top: 10), - child: AppText( - TranslationBase.of(context).validationMessage + ' ' + displayTime, - color: Colors.red, - textAlign: TextAlign.center, - )) - ], - )), - ); }), ); });