pull/43/head
haroon amjad 1 month ago
parent 64818c082e
commit c191fd0be1

@ -723,7 +723,7 @@ const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_In
class ApiConsts {
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

@ -363,7 +363,7 @@ class AuthenticationViewModel extends ChangeNotifier {
);
// TODO: GET APP SMS SIGNATURE HERE
request.sMSSignature =await getSignature();
request.sMSSignature = await getSignature();
if (checkIsUserComingForRegister(request: payload)) {
_appState.setUserRegistrationPayload = RegistrationDataModelPayload.fromJson(payload);
@ -617,8 +617,8 @@ class AuthenticationViewModel extends ChangeNotifier {
} else {
// authenticated = true;
await insertPatientIMEIData(loginTypeEnum.toInt);
}
LoaderBottomSheet.hideLoader();
}
notifyListeners();
// navigateToHomeScreen();
} else {
@ -873,6 +873,7 @@ class AuthenticationViewModel extends ChangeNotifier {
getDeviceLastLogin = deviceInfo.first['LoginType'];
await checkActivationCode(otpTypeEnum: OTPTypeEnum.faceIDFingerprint, activationCode: null, onWrongActivationCode: (String? message) {});
await insertPatientIMEIData(loginTypeEnum.toInt);
LoaderBottomSheet.hideLoader();
}
if (apiResponse.messageStatus == 2) {
LoaderBottomSheet.hideLoader();
@ -937,6 +938,7 @@ class AuthenticationViewModel extends ChangeNotifier {
},
);
}
Future<String?> getSignature() async {
if (Platform.isAndroid) {
return await SmsVerification.getAppSignature();
@ -944,5 +946,4 @@ class AuthenticationViewModel extends ChangeNotifier {
return null;
}
}
}

@ -5,9 +5,12 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:get_it/get_it.dart';
import 'package:hmg_patient_app_new/core/cache_consts.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/app_bar_widget.dart';
import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart';
@ -95,6 +98,8 @@ class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixi
bool hasFocus = false;
AuthenticationViewModel? authVm;
final CacheService cacheService = GetIt.instance<CacheService>();
@override
void didUpdateWidget(OTPWidget oldWidget) {
super.didUpdateWidget(oldWidget);
@ -138,6 +143,7 @@ class OTPWidgetState extends State<OTPWidget> with SingleTickerProviderStateMixi
}
focusNode.addListener(_focusListener);
authVm?.otpScreenNotifier.addListener(_onOtpScreenNotifierChanged);
cacheService.remove(key: CacheConst.quickLoginEnabled);
}
void _controllerListener() {

@ -93,6 +93,7 @@ class _LandingPageState extends State<LandingPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
appState.isAuthenticated
? WelcomeWidget(
onTap: () {

@ -27,7 +27,7 @@ class _LandingNavigationState extends State<LandingNavigation> {
physics: const NeverScrollableScrollPhysics(),
children: [
const LandingPage(),
appState.isAuthenticated ? MedicalFilePage() :/* need add feedback page */ const LandingPage(),
appState.isAuthenticated ? MedicalFilePage() : /* need add feedback page */ const LandingPage(),
BookAppointmentPage(),
const LandingPage(),
appState.isAuthenticated ? /* need add news page */ LandingPage() : const LandingPage(),

Loading…
Cancel
Save