|
|
|
|
@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/auth/sms-popup.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_loader_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
@ -24,7 +24,7 @@ import '../../utils/utils.dart';
|
|
|
|
|
import '../../widgets/auth/verification_methods_list.dart';
|
|
|
|
|
|
|
|
|
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
|
|
|
|
TabUtil helpers = TabUtil();
|
|
|
|
|
Utils helpers = Utils();
|
|
|
|
|
|
|
|
|
|
///TODO Elham* check if this still in user or not
|
|
|
|
|
class VerificationMethodsScreen extends StatefulWidget {
|
|
|
|
|
@ -101,7 +101,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
letterSpacing: -0.72,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TabUtil.convertToTitleCase(
|
|
|
|
|
Utils.convertToTitleCase(
|
|
|
|
|
authenticationViewModel.user.doctorName),
|
|
|
|
|
fontSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
@ -499,7 +499,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
authMethodType: authMethodType,
|
|
|
|
|
password: authenticationViewModel.userInfo.password);
|
|
|
|
|
if (authenticationViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
TabUtil.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
Utils.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -508,7 +508,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
} else {
|
|
|
|
|
// TODO route to this page with parameters to inicate we should present 2 option
|
|
|
|
|
if (Platform.isAndroid && authMethodType == AuthMethodTypes.Fingerprint) {
|
|
|
|
|
TabUtil.showErrorToast('Your device not support this feature');
|
|
|
|
|
Utils.showErrorToast('Your device not support this feature');
|
|
|
|
|
} else {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -520,7 +520,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
|
|
|
|
|
if (authenticationViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
TabUtil.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
Utils.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
} else {
|
|
|
|
|
await sharedPref.setString(
|
|
|
|
|
TOKEN,
|
|
|
|
|
@ -620,7 +620,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
activationCode: value, isSilentLogin: isSilentLogin);
|
|
|
|
|
if (authenticationViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
TabUtil.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
Utils.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
} else {
|
|
|
|
|
await authenticationViewModel.onCheckActivationCodeSuccess();
|
|
|
|
|
if (value != null) {
|
|
|
|
|
@ -633,7 +633,7 @@ class _VerificationMethodsScreenState extends State<VerificationMethodsScreen> {
|
|
|
|
|
|
|
|
|
|
navigateToLandingPage() {
|
|
|
|
|
if (authenticationViewModel.state == ViewState.ErrorLocal) {
|
|
|
|
|
TabUtil.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
Utils.showErrorToast(authenticationViewModel.error);
|
|
|
|
|
} else {
|
|
|
|
|
authenticationViewModel.setAppStatus(APP_STATUS.AUTHENTICATED);
|
|
|
|
|
}
|
|
|
|
|
|