otp screen & register Uae & resend Activation Code.

pull/45/head
aamir-csol 1 month ago
parent 28a95959e0
commit 3b1b51ef6f

@ -57,7 +57,8 @@ class AuthenticationViewModel extends ChangeNotifier {
required NavigationService navigationService,
required CacheService cacheService,
required LocalAuthService localAuthService,
}) : _navigationService = navigationService,
})
: _navigationService = navigationService,
_dialogService = dialogService,
_errorHandlerService = errorHandlerService,
_appState = appState,
@ -298,7 +299,8 @@ class AuthenticationViewModel extends ChangeNotifier {
final result = await _authenticationRepo.checkPatientAuthentication(checkPatientAuthenticationReq: checkPatientAuthenticationReq);
result.fold(
(failure) async => await _errorHandlerService.handleError(
(failure) async =>
await _errorHandlerService.handleError(
failure: failure,
onUnHandledFailure: (failure) async {
LoaderBottomSheet.hideLoader();
@ -441,7 +443,8 @@ class AuthenticationViewModel extends ChangeNotifier {
LoaderBottomSheet.hideLoader();
resultEither.fold(
(failure) async => await _errorHandlerService.handleError(
(failure) async =>
await _errorHandlerService.handleError(
failure: failure,
onUnHandledFailure: (failure) async {
LoaderBottomSheet.hideLoader();
@ -468,7 +471,8 @@ class AuthenticationViewModel extends ChangeNotifier {
final resultEither = await _authenticationRepo.checkActivationCodeRepo(newRequest: CheckActivationCodeRegisterReq.fromJson(request), activationCode: activationCode, isRegister: false);
resultEither.fold(
(failure) async => await _errorHandlerService.handleError(
(failure) async =>
await _errorHandlerService.handleError(
failure: failure,
onUnHandledFailure: (failure) async {
LoaderBottomSheet.hideLoader();
@ -878,7 +882,7 @@ class AuthenticationViewModel extends ChangeNotifier {
message: apiResponse.errorMessage ?? "",
label: LocaleKeys.notice.tr(),
onOkPressed: () {
_dialogService.showPhoneNumberPickerSheet(onSMSPress: () {
_dialogService.showPhoneNumberPickerSheet(label:"Where would you like to receive OTP?", message:"Please select from the below options to receive OTP.", onSMSPress: () {
checkUserAuthentication(otpTypeEnum: OTPTypeEnum.sms);
}, onWhatsappPress: () {
checkUserAuthentication(otpTypeEnum: OTPTypeEnum.whatsapp);

@ -109,11 +109,11 @@ void showCommonBottomSheetWithoutHeight(
required Widget child,
required VoidCallback callBackFunc,
String title = "",
bool isCloseButtonVisible = true,
bool isFullScreen = true,
bool isDismissible = true,
Widget? titleWidget,}) {
Widget? titleWidget,
}) {
showModalBottomSheet<String>(
sheetAnimationStyle: AnimationStyle(
duration: Duration(milliseconds: 500), // Custom animation duration
@ -141,7 +141,7 @@ void showCommonBottomSheetWithoutHeight(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
titleWidget ?? title.toText20(weight: FontWeight.w600),
titleWidget ?? Expanded(child: title.toText20(weight: FontWeight.w600)),
Utils.buildSvgWithAssets(icon: AppAssets.close_bottom_sheet_icon, iconColor: Color(0xff2B353E)).onPress(() {
Navigator.of(context).pop();
}),

Loading…
Cancel
Save