From abbe89167306642693e8c97f830fb66e13f7412d Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 27 Dec 2020 12:26:02 +0200 Subject: [PATCH] improve code quality --- lib/config/shared_pref_kay.dart | 7 ------- lib/widgets/auth/login_form.dart | 7 ------- lib/widgets/auth/verfiy_account.dart | 19 ------------------- 3 files changed, 33 deletions(-) diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index c41859e6..7fd0eba2 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -3,14 +3,7 @@ final PROJECT_ID = 'projectID'; final VIDA_AUTH_TOKEN_ID = 'VidaAuthTokenID'; final VIDA_REFRESH_TOKEN_ID = 'VidaRefreshTokenID'; final LOGIN_TOKEN_ID = 'LogInToken'; - - -// set VidaAuthTokenID -// VidaRefreshTokenID -// LogInTokenIDPROJECT_ID = 'projectID'; -//===========amjad============ final DOCTOR_ID = 'doctorID'; -//======================= final SLECTED_PATIENT_TYPE = 'slectedPatientType'; final APP_Language = 'language'; final DOCTOR_PROFILE = 'doctorProfile'; diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index d7eaeeb6..808b1763 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -225,10 +225,6 @@ class _LoginFormState extends State { login(context, AuthViewModel authProv, Function changeLoadingStata) { FocusScopeNode currentFocus = FocusScope.of(context); - - // if (!currentFocus.hasPrimaryFocus) { - // currentFocus.unfocus(); - // } changeLoadingStata(true); if (loginFormKey.currentState.validate()) { loginFormKey.currentState.save(); @@ -242,13 +238,10 @@ class _LoginFormState extends State { sharedPref.setString(TOKEN, res['LogInTokenID']); print("token" + res['LogInTokenID']); Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (BuildContext context) => VerificationMethodsScreen(password: userInfo.password,))); - // Navigator.of(context).pushReplacementNamed(VERIFICATION_METHODS); } else { // handel error - // widget.showCenterShortLoadingToast("watting"); helpers.showErrorToast(res['ErrorEndUserMessage']); } - // Navigator.of(context).pushNamed(HOME); }).catchError((err) { print('$err'); changeLoadingStata(false); diff --git a/lib/widgets/auth/verfiy_account.dart b/lib/widgets/auth/verfiy_account.dart index 35332198..e72e1317 100644 --- a/lib/widgets/auth/verfiy_account.dart +++ b/lib/widgets/auth/verfiy_account.dart @@ -363,25 +363,6 @@ class _VerifyAccountState extends State { "IsLoginForDoctorApp": true, "IsSilentLogIN": false }; - - // "MobileNumber": "0541696495", - // - // "ZipCode": "966", - // - // "DoctorID": 1485, - // "IPAdress": "10.10.10.10", - // - // "Channel": 9, - // - // "LanguageID": 2, - // - // "ProjectID": 15, - // - // "VersionID": 1.2, - // - // "generalid": "Cs2020@2016$2958", - // - // "LogInTokenID": "+C16+k1lMkOwG2Zynd0nDQ==", CheckActivationCodeRequestModel checkActivationCodeForDoctorApp = new CheckActivationCodeRequestModel( zipCode: _loggedUser['ZipCode'], mobileNumber: _loggedUser['MobileNumber'],