File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import 'package:flutter/src/widgets/framework.dart';
9
9
import 'package:local_auth/local_auth.dart' ;
10
10
import 'package:local_auth/error_codes.dart' as auth_error;
11
11
12
- class BiometricAuthAction extends EnsembleAction {
12
+ class AuthenticateByBiometric extends EnsembleAction {
13
13
EnsembleAction ? onAuthenticated;
14
14
EnsembleAction ? onAuthenticationFailed;
15
15
EnsembleAction ? onSensorNotAvailable;
@@ -19,7 +19,7 @@ class BiometricAuthAction extends EnsembleAction {
19
19
String ? label;
20
20
String ? androidTitle;
21
21
22
- BiometricAuthAction ({
22
+ AuthenticateByBiometric ({
23
23
this .onAuthenticated,
24
24
this .onAuthenticationFailed,
25
25
this .allowConfiguration,
@@ -82,7 +82,7 @@ class BiometricAuthAction extends EnsembleAction {
82
82
print ("localAuth: onAuthenticated is required" );
83
83
return null ;
84
84
}
85
- return BiometricAuthAction (
85
+ return AuthenticateByBiometric (
86
86
onAuthenticated: EnsembleAction .fromYaml (payload['onAuthenticated' ]),
87
87
onAuthenticationFailed:
88
88
EnsembleAction .fromYaml (payload['onAuthenticationFailed' ]),
Original file line number Diff line number Diff line change @@ -1126,7 +1126,7 @@ enum ActionType {
1126
1126
invokeHaptic,
1127
1127
callNativeMethod,
1128
1128
deeplinkInit,
1129
- biometricAuth ,
1129
+ authenticateByBiometric ,
1130
1130
handleDeeplink,
1131
1131
createDeeplink,
1132
1132
verifySignIn,
@@ -1306,8 +1306,8 @@ abstract class EnsembleAction {
1306
1306
return SeekAudio .from (payload);
1307
1307
} else if (actionType == ActionType .deeplinkInit) {
1308
1308
return DeepLinkInitAction .fromMap (payload: payload);
1309
- } else if (actionType == ActionType .biometricAuth ) {
1310
- return BiometricAuthAction .fromMap (payload: payload);
1309
+ } else if (actionType == ActionType .authenticateByBiometric ) {
1310
+ return AuthenticateByBiometric .fromMap (payload: payload);
1311
1311
} else if (actionType == ActionType .handleDeeplink) {
1312
1312
return DeepLinkHandleAction .fromMap (payload: payload);
1313
1313
} else if (actionType == ActionType .createDeeplink) {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import 'dart:ui';
5
5
import 'package:ensemble/action/Log_event_action.dart' ;
6
6
import 'package:ensemble/action/action_invokable.dart' ;
7
7
import 'package:ensemble/action/audio_player.dart' ;
8
+ import 'package:ensemble/action/biometric_auth_action.dart' ;
8
9
import 'package:ensemble/action/bottom_modal_action.dart' ;
9
10
import 'package:ensemble/action/haptic_action.dart' ;
10
11
import 'package:ensemble/action/invoke_api_action.dart' ;
@@ -546,6 +547,12 @@ class NativeInvokable extends ActionInvokable {
546
547
buildContext,
547
548
LogEvent .from (payload: inputs),
548
549
),
550
+ ActionType .authenticateByBiometric.name: (inputs) {
551
+ final action =
552
+ AuthenticateByBiometric .fromMap (payload: Utils .getYamlMap (inputs));
553
+ if (action == null ) return null ;
554
+ return ScreenController ().executeAction (buildContext, action);
555
+ },
549
556
});
550
557
return methods;
551
558
}
You can’t perform that action at this time.
0 commit comments