Merge pull request 'haroon_dev' (#39) from haroon_dev into master

Reviewed-on: #39
pull/43/head
Haroon6138 1 month ago
commit 88f56885ff

@ -723,7 +723,7 @@ const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_In
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -48,6 +48,7 @@ class AuthenticationViewModel extends ChangeNotifier {
final DialogService _dialogService; final DialogService _dialogService;
final NavigationService _navigationService; final NavigationService _navigationService;
final LocalAuthService _localAuthService; final LocalAuthService _localAuthService;
AuthenticationViewModel({ AuthenticationViewModel({
required AppState appState, required AppState appState,
required AuthenticationRepo authenticationRepo, required AuthenticationRepo authenticationRepo,
@ -106,7 +107,6 @@ class AuthenticationViewModel extends ChangeNotifier {
} }
Future<void> clearDefaultInputValues() async { Future<void> clearDefaultInputValues() async {
nationalIdController.clear(); nationalIdController.clear();
phoneNumberController.clear(); phoneNumberController.clear();
emailController.clear(); emailController.clear();
@ -622,19 +622,20 @@ class AuthenticationViewModel extends ChangeNotifier {
} }
checkLastLoginStatus(Function() onSuccess) async { checkLastLoginStatus(Function() onSuccess) async {
Future.delayed(Duration(seconds: 1), () async { Future.delayed(Duration(seconds: 1), () async {
if(cacheService.getBool(key: CacheConst.quickLoginEnabled) == null){ if (cacheService.getBool(key: CacheConst.quickLoginEnabled) == null) {
if (_appState.getSelectDeviceByImeiRespModelElement != null && if (_appState.getSelectDeviceByImeiRespModelElement != null &&
(_appState.getSelectDeviceByImeiRespModelElement!.logInType == 1 || _appState.getSelectDeviceByImeiRespModelElement!.logInType == 4)) { (_appState.getSelectDeviceByImeiRespModelElement!.logInType == 1 || _appState.getSelectDeviceByImeiRespModelElement!.logInType == 4)) {
phoneNumberController.text = phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0")
(_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0") ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "") : _appState.getAuthenticatedUser()!.mobileNumber)!; ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "")
: _appState.getAuthenticatedUser()!.mobileNumber)!;
nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!; nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!;
onSuccess(); onSuccess();
} else if ((loginTypeEnum == LoginTypeEnum.sms || loginTypeEnum == LoginTypeEnum.whatsapp && _appState.getSelectDeviceByImeiRespModelElement == null) && } else if ((loginTypeEnum == LoginTypeEnum.sms || loginTypeEnum == LoginTypeEnum.whatsapp && _appState.getSelectDeviceByImeiRespModelElement == null) &&
_appState.getAuthenticatedUser() != null) { _appState.getAuthenticatedUser() != null) {
phoneNumberController.text = phoneNumberController.text = (_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0")
(_appState.getAuthenticatedUser()!.mobileNumber!.startsWith("0") ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "") : _appState.getAuthenticatedUser()!.mobileNumber)!; ? _appState.getAuthenticatedUser()!.mobileNumber!.replaceFirst("0", "")
: _appState.getAuthenticatedUser()!.mobileNumber)!;
nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!; nationalIdController.text = _appState.getAuthenticatedUser()!.nationalityId!;
onSuccess(); onSuccess();
} }

@ -296,6 +296,7 @@ class _RegisterNew extends State<RegisterNew> {
borderColor: AppColors.borderOnlyColor, borderColor: AppColors.borderOnlyColor,
textColor: AppColors.textColor, textColor: AppColors.textColor,
icon: AppAssets.whatsapp, icon: AppAssets.whatsapp,
iconColor: null,
), ),
), ),
], ],

Loading…
Cancel
Save