|
|
|
@ -1,5 +1,6 @@
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
|
|
|
|
@ -40,6 +41,9 @@ class _Login extends State<Login> {
|
|
|
|
AppointmentRateViewModel appointmentRateViewModel =
|
|
|
|
AppointmentRateViewModel appointmentRateViewModel =
|
|
|
|
locator<AppointmentRateViewModel>();
|
|
|
|
locator<AppointmentRateViewModel>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
// getDeviceToken();
|
|
|
|
// getDeviceToken();
|
|
|
|
@ -196,6 +200,7 @@ class _Login extends State<Login> {
|
|
|
|
// request.isRegister = false;
|
|
|
|
// request.isRegister = false;
|
|
|
|
this.authService.checkActivationCode(request, code).then((result) => {
|
|
|
|
this.authService.checkActivationCode(request, code).then((result) => {
|
|
|
|
result = CheckActivationCode.fromJson(result),
|
|
|
|
result = CheckActivationCode.fromJson(result),
|
|
|
|
|
|
|
|
authenticatedUserObject.getUser(),
|
|
|
|
this.sharedPref.setObject(USER_PROFILE, result.list),
|
|
|
|
this.sharedPref.setObject(USER_PROFILE, result.list),
|
|
|
|
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
|
|
|
|
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
|
|
|
|
this.sharedPref.setString(TOKEN, result.authenticationTokenID),
|
|
|
|
this.sharedPref.setString(TOKEN, result.authenticationTokenID),
|
|
|
|
|