|
|
|
|
@ -42,8 +42,9 @@ import 'package:provider/provider.dart';
|
|
|
|
|
class ConfirmLogin extends StatefulWidget {
|
|
|
|
|
final Function changePageViewIndex;
|
|
|
|
|
final fromRegistration;
|
|
|
|
|
final bool isDubai;
|
|
|
|
|
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai =false}) : super(key: key);
|
|
|
|
|
final bool isDubai;
|
|
|
|
|
|
|
|
|
|
const ConfirmLogin({Key key, this.changePageViewIndex, this.fromRegistration = false, this.isDubai = false}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_ConfirmLogin createState() => _ConfirmLogin();
|
|
|
|
|
@ -386,9 +387,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
request.sMSSignature = await SMSOTP.getSignature();
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
if (healthId != null || widget.isDubai) {
|
|
|
|
|
if(!widget.isDubai){
|
|
|
|
|
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
|
|
|
|
|
}
|
|
|
|
|
if (!widget.isDubai) {
|
|
|
|
|
request.dob = dob; //isHijri == 1 ? dob : dateFormat2.format(dateFormat.parse(dob));
|
|
|
|
|
}
|
|
|
|
|
request.healthId = healthId;
|
|
|
|
|
request.isHijri = isHijri;
|
|
|
|
|
await this.authService.sendActivationCodeRegister(request).then((result) {
|
|
|
|
|
@ -568,7 +569,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
var request = this.getCommonRequest().toJson();
|
|
|
|
|
dynamic res;
|
|
|
|
|
if (healthId != null || widget.isDubai) {
|
|
|
|
|
if(!widget.isDubai) {
|
|
|
|
|
if (!widget.isDubai) {
|
|
|
|
|
request['DOB'] = dob;
|
|
|
|
|
}
|
|
|
|
|
request['HealthId'] = healthId;
|
|
|
|
|
@ -583,7 +584,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
result = CheckActivationCode.fromJson(result),
|
|
|
|
|
if (this.registerd_data != null && this.registerd_data.isRegister == true)
|
|
|
|
|
{
|
|
|
|
|
// if(widget.isDubai ==false){
|
|
|
|
|
// if(widget.isDubai ==false){
|
|
|
|
|
widget.changePageViewIndex(1),
|
|
|
|
|
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
|
|
|
|
|
}
|
|
|
|
|
@ -694,36 +695,16 @@ class _ConfirmLogin extends State<ConfirmLogin> {
|
|
|
|
|
projectViewModel.user = authenticatedUserObject.user;
|
|
|
|
|
await authenticatedUserObject.getUser(getUser: true);
|
|
|
|
|
|
|
|
|
|
// getToDoCount();
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
appointmentRateViewModel
|
|
|
|
|
.getIsLastAppointmentRatedList()
|
|
|
|
|
.then((value) => {
|
|
|
|
|
getToDoCount(),
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
|
|
|
|
|
if (appointmentRateViewModel.isHaveAppointmentNotRate)
|
|
|
|
|
{
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RateAppointmentDoctor(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: LandingPage(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false)
|
|
|
|
|
},
|
|
|
|
|
insertIMEI()
|
|
|
|
|
})
|
|
|
|
|
.catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
getToDoCount();
|
|
|
|
|
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: LandingPage(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loading(flag) {
|
|
|
|
|
|