|
|
@ -335,16 +335,16 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
|
|
|
|
if (!isDirectLogin)
|
|
|
|
if (!isDirectLogin)
|
|
|
|
BasicMemberInformationModel? memberInformationModel =
|
|
|
|
BasicMemberInformationModel? memberInformationModel =
|
|
|
|
await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName);
|
|
|
|
await LoginApiClient().mohemmSendActivationCodeByOTPNotificationType(0, AppState().memberLoginList?.pMOBILENUMBER, sendVerificationFlat, AppState().getUserName);
|
|
|
|
if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, "");
|
|
|
|
if (isDirectLogin) performDirectApiCall(_title, _icon, _flag, "", null);
|
|
|
|
if (!isDirectLogin) Utils.hideLoading(context);
|
|
|
|
if (!isDirectLogin) Utils.hideLoading(context);
|
|
|
|
if (!isDirectLogin)
|
|
|
|
if (!isDirectLogin)
|
|
|
|
OtpDialog(
|
|
|
|
OtpDialog(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
sendVerificationFlat,
|
|
|
|
sendVerificationFlat,
|
|
|
|
int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""),
|
|
|
|
int.tryParse(AppState().memberLoginList?.pMOBILENUMBER ?? ""),
|
|
|
|
(value) async {
|
|
|
|
(value, TextEditingController _pinPutController) async {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
performDirectApiCall(_title, _icon, _flag, value);
|
|
|
|
performDirectApiCall(_title, _icon, _flag, value, _pinPutController);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
() => {
|
|
|
|
() => {
|
|
|
|
Navigator.pop(context),
|
|
|
|
Navigator.pop(context),
|
|
|
@ -359,7 +359,7 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> performDirectApiCall(String _title, String _icon, int _flag, String value, {bool isDirectLogin = false}) async {
|
|
|
|
Future<void> performDirectApiCall(String _title, String _icon, int _flag, String value, TextEditingController? _pinPutController, {bool isDirectLogin = false}) async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(false, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName);
|
|
|
|
GenericResponseModel? genericResponseModel = await LoginApiClient().checkActivationCode(false, AppState().memberLoginList?.pMOBILENUMBER, value, AppState().getUserName);
|
|
|
|
GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW(
|
|
|
|
GenericResponseModel? genericResponseModel1 = await LoginApiClient().insertMobileLoginInfoNEW(
|
|
|
@ -372,14 +372,18 @@ class _VerifyLastLoginScreenState extends State<VerifyLastLoginScreen> {
|
|
|
|
mobileLoginInfoListModel!.deviceToken!,
|
|
|
|
mobileLoginInfoListModel!.deviceToken!,
|
|
|
|
Platform.isAndroid ? "android" : "ios");
|
|
|
|
Platform.isAndroid ? "android" : "ios");
|
|
|
|
AppState().setMemberInformationListModel = genericResponseModel!.memberInformationList?.first;
|
|
|
|
AppState().setMemberInformationListModel = genericResponseModel!.memberInformationList?.first;
|
|
|
|
if (genericResponseModel?.errorMessage != null) {
|
|
|
|
if (genericResponseModel.errorMessage != null) {
|
|
|
|
Utils.showToast(genericResponseModel?.errorMessage ?? "");
|
|
|
|
Utils.showToast(genericResponseModel.errorMessage ?? "");
|
|
|
|
// Navigator.pop(context);
|
|
|
|
// Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);
|
|
|
|
Navigator.pushNamedAndRemoveUntil(context, AppRoutes.dashboard, (Route<dynamic> route) => false);
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
|
|
|
|
|
if (_pinPutController != null) {
|
|
|
|
|
|
|
|
_pinPutController.clear();
|
|
|
|
|
|
|
|
otpFieldClear.value = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|