| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -1,4 +1,5 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import 'dart:io' show Platform;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import 'package:flutter/material.dart';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import 'package:hexcolor/hexcolor.dart';
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				import 'package:provider/provider.dart';
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -31,6 +32,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  MainAxisAlignment spaceBetweenMethods = MainAxisAlignment.spaceBetween;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Future _loggedUserFuture;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  var _loggedUser;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  var verificationMethod;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  @override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  void initState() {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    super.initState();
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -43,6 +45,14 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  @override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  void didChangeDependencies() {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    super.didChangeDependencies();
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    final routeArgs = ModalRoute.of(context).settings.arguments as Map;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    verificationMethod =
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        routeArgs != null ? routeArgs['verificationMethod'] : null;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  @override
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Widget build(BuildContext context) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    AuthProvider authProv = Provider.of<AuthProvider>(context);
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -63,7 +73,9 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    crossAxisAlignment: CrossAxisAlignment.start,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    children: <Widget>[
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                      Text(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        "Please choose one of the Following option to verify",
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        hideSilentMethods()
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            ? 'As a first step, you need to verify by one of those methods'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            : 'Please choose one of the Following option to verify',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        style: TextStyle(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                          fontSize: 3.5 * SizeConfig.textMultiplier,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        ),
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -84,30 +96,28 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                mainAxisSpacing: 5,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                crossAxisCount: 2,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                children: <Widget>[
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      context,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'assets/images/verification_fingerprint_icon.png',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'Fingerprint',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      () {}),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      context,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'assets/images/verification_faceid_icon.png',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'Face ID',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      () {}),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      context,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'assets/images/verification_whatsapp_icon.png',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'WhatsApp', () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    sendActivationCodeByOtpNotificationType(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                        2, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  }),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      context,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'assets/images/verification_sms_icon.png',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      'SMS', () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    sendActivationCodeByOtpNotificationType(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                        1, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  }),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  Visibility(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    visible: hideSilentMethods() ? false : true,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    child: buildFingerprintMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                        context, authProv),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    replacement:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                        buildWhatsAppMethod(context, authProv),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  Visibility(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    visible: hideSilentMethods() ? false : true,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    child: buildFaceIDMethod(context, authProv),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    replacement:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                        buildSMSMethod(context, authProv),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  Visibility(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      visible:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                          hideSilentMethods() ? false : true,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                      child: buildWhatsAppMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                          context, authProv)),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  Visibility(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    visible: hideSilentMethods() ? false : true,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                    child: buildSMSMethod(context, authProv),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                  ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                                ],
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                              ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                            ),
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -115,9 +125,9 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        // height: 500,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                      ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                     SizedBox(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                        // height:  20,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                      )
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                      SizedBox(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                          // height:  20,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                          )
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                    ],
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                  ),
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				                );
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -126,6 +136,67 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 /* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:28/5/2020
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@param: BuildContext context, AuthProvider authProv
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@return: Center widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   buildSMSMethod Methods widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Center buildSMSMethod(BuildContext context, AuthProvider authProv) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        context, 'assets/images/verification_sms_icon.png', 'SMS', () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      sendActivationCodeByOtpNotificationType(1, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 /* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:28/5/2020
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@param: BuildContext context, AuthProvider authProv
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@return: Center widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   build WhatsApp  Methods widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Center buildWhatsAppMethod(BuildContext context, AuthProvider authProv) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        context, 'assets/images/verification_whatsapp_icon.png', 'WhatsApp',
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      sendActivationCodeByOtpNotificationType(2, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				/* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:28/5/2020
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@param: BuildContext context, AuthProvider authProv
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@return: Center widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   build FaceID Methods widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Center buildFaceIDMethod(BuildContext context, AuthProvider authProv) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return buildVerificationMethod(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        context, 'assets/images/verification_faceid_icon.png', 'Face ID', () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      sendActivationCodeByOtpNotificationType(3, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				/* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:28/5/2020
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@param: BuildContext context, AuthProvider authProv
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@return: Center widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   build Fingerprint Methods widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Center buildFingerprintMethod(BuildContext context, AuthProvider authProv) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return buildVerificationMethod(context,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        'assets/images/verification_fingerprint_icon.png', 'Fingerprint', () {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      sendActivationCodeByOtpNotificationType(4, authProv);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  /* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:28/5/2020
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@param: BuildContext context, AuthProvider authProv
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@return: Center widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   build Verification Methods widget
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  Center buildVerificationMethod(context, url, dec, Function fun) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return Center(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      child: InkWell(
 | 
			
		
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
			
			 | 
			 | 
			
				@ -168,6 +239,10 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    );
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  bool hideSilentMethods() {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    return verificationMethod == 4 || verificationMethod == 3 ? true : false;
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				/* 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@author: Elham Rababah 
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@Date:15/4/2020  
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -176,9 +251,10 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 *@desc:   send Activation Code By Otp Notification Type
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				 */
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  sendActivationCodeByOtpNotificationType(oTPSendType, AuthProvider authProv) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    widget.changeLoadingStata(true);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    // TODO : build enum for verfication method
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    if (oTPSendType == 1 || oTPSendType == 2) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      widget.changeLoadingStata(true);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      Map model = {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        "LogInTokenID": _loggedUser['LogInTokenID'],
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        "Channel": 9,
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -190,10 +266,7 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        "UserName": _loggedUser['List_MemberInformation'][0]['MemberID'],
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        "OTP_SendType": oTPSendType
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      };
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // print('$_loggedUser');
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // print(oTPSendType);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      authProv.sendActivationCodeByOtpNotificationType(model).then((res) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        // Navigator.of(context).pushNamed(VERIFY_ACCOUNT);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        widget.changeLoadingStata(false);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        if (res['MessageStatus'] == 1) {
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -202,7 +275,6 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          print(res['ErrorEndUserMessage']);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				          helpers.showErrorToast(res['ErrorEndUserMessage']);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        // Navigator.of(context).pushNamed(HOME);
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      }).catchError((err) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        print('$err');
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        widget.changeLoadingStata(false);
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
			
			 | 
			 | 
			
				@ -211,6 +283,12 @@ class _VerificationMethodsState extends State<VerificationMethods> {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      });
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      // TODO route to this page with parameters to inicate we should present 2 option
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      if (Platform.isAndroid && oTPSendType == 3) {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        helpers.showErrorToast('Your device not support this feature');
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      } else {
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				        Navigator.of(context).pushNamed(VERIFICATION_METHODS,
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				            arguments: {'verificationMethod': oTPSendType});
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				      }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				    }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				  }
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				}
 | 
			
		
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |