Merge branch 'elham' into 'master'

fix login issue by making project id dynamic

See merge request Cloud_Solution/doctor_app_flutter!35
merge-requests/36/merge
Elham 5 years ago
commit ee13dad30e

@ -1 +1,2 @@
final TOKEN = 'token';
final PROJECT_ID="projectID";

@ -198,6 +198,7 @@ class _LoginFormState extends State<LoginForm> {
changeLoadingStata(true);
if (loginFormKey.currentState.validate()) {
loginFormKey.currentState.save();
sharedPref.setInt(PROJECT_ID, userInfo.ProjectID);
authProv.login(userInfo).then((res) {
changeLoadingStata(false);

@ -256,7 +256,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
*@return:
*@desc: verify Account func call sendActivationCodeByOtpNotificationType service
*/
verifyAccount(AuthProvider authProv, Function changeLoadingStata) {
verifyAccount(AuthProvider authProv, Function changeLoadingStata) async{
if (verifyAccountForm.currentState.validate()) {
changeLoadingStata(true);
@ -266,12 +266,12 @@ class _VerifyAccountState extends State<VerifyAccount> {
verifyAccountFormValue['digit3'] +
verifyAccountFormValue['digit4'];
print(activationCode);
print('${_loggedUser}');
int projectID = await sharedPref.getInt(PROJECT_ID);
Map model = {
"activationCode": activationCode,
"DoctorID": _loggedUser['DoctorID'],
"LogInTokenID": _loggedUser['LogInTokenID'],
"ProjectID": 15,
"ProjectID": projectID,
"LanguageID": 2,
"stamp": "2020-02-26T14:48:27.221Z",
"IPAdress": "11.11.11.11",

Loading…
Cancel
Save