no message

pull/24/head
Sultan khan 2 months ago
parent 2a081e30b5
commit 1466b6b71a

@ -509,10 +509,11 @@ class AuthenticationViewModel extends ChangeNotifier {
await _dialogService.showErrorBottomSheet(message: message ?? "Something went wrong. ", onOkPressed: () {});
}
loginWithFingerPrintFace() async {
loginWithFingerPrintFace(Function success) async {
_localAuthService.authenticate().then((value) async {
if (value) {
// we have to handle this if verification true;
success();
if(!_appState.isAuthenticated) {
loginTypeEnum = (_appState.deviceTypeID == 1 ? LoginTypeEnum.face : LoginTypeEnum.fingerprint);
print(loginTypeEnum);

@ -101,9 +101,6 @@ class _QuickLogin extends State<QuickLogin> {
text:LocaleKeys.enableQuickLogin.tr(),
onPressed: () {
widget.onPressed();
setState(() {
});
},
backgroundColor: Color(0xffED1C2B),
borderColor: Color(0xffED1C2B),

@ -97,7 +97,7 @@ class _SavedLogin extends State<SavedLogin> {
text: "${LocaleKeys.loginBy.tr()} ${loginType.displayName}",
onPressed: () {
if (loginType == LoginTypeEnum.fingerprint || loginType == LoginTypeEnum.face) {
authVm.loginWithFingerPrintFace();
authVm.loginWithFingerPrintFace((){});
} else {
// int? val = loginType.toInt;
authVm.checkUserAuthentication(otpTypeEnum: loginType == LoginTypeEnum.sms ? OTPTypeEnum.sms : OTPTypeEnum.whatsapp);
@ -220,7 +220,7 @@ class _SavedLogin extends State<SavedLogin> {
iconColor: null,
onPressed: () {
if (loginType == LoginTypeEnum.fingerprint || loginType == LoginTypeEnum.face) {
authVm.loginWithFingerPrintFace();
authVm.loginWithFingerPrintFace((){});
} else {
loginType = LoginTypeEnum.whatsapp;
int? val = loginType.toInt;

@ -35,14 +35,14 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> {
late final AuthenticationViewModel authVM;
bool isDone = false;
@override
void initState() {
authVM = context.read<AuthenticationViewModel>();
authVM.savePushTokenToAppState();
if (mounted) {
authVM.checkLastLoginStatus(() {
showQuickLogin(context, false);
showQuickLogin(context);
});
}
super.initState();
@ -321,7 +321,7 @@ class _LandingPageState extends State<LandingPage> {
);
}
void showQuickLogin(BuildContext context, bool isDone) {
void showQuickLogin(BuildContext context) {
showCommonBottomSheet(
context,
title: "",
@ -329,16 +329,19 @@ class _LandingPageState extends State<LandingPage> {
isDone: isDone,
onPressed: () {
// sharedPref.setBool(HAS_ENABLED_QUICK_LOGIN, true);
authVM.loginWithFingerPrintFace();
authVM.loginWithFingerPrintFace((){
isDone = true;
setState(() {
});
});
},
),
height:isDone == false ? ResponsiveExtension.screenHeight * 0.5 : ResponsiveExtension.screenHeight * 0.3,
isFullScreen: false,
callBackFunc: (str) {
isDone = true;
setState(() {
});
},
);
}

Loading…
Cancel
Save