@@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
5
5
import 'package:flutter/material.dart' ;
6
6
import 'package:root_jailbreak_sniffer/rjsniffer.dart' ;
7
7
import 'package:ensemble_ts_interpreter/invokables/invokable.dart' ;
8
+ import 'package:flutter_security_checker/flutter_security_checker.dart' ;
8
9
import 'package:ensemble/framework/event.dart' ;
9
10
10
11
class DeviceSecurity extends EnsembleAction with Invokable {
@@ -19,7 +20,7 @@ class DeviceSecurity extends EnsembleAction with Invokable {
19
20
@override
20
21
Future <void > execute (BuildContext context, ScopeManager scopeManager) async {
21
22
if (kIsWeb) {
22
- _handleSuccess (context, false , false , false ,
23
+ _handleSuccess (context, false , false , false ,false ,
23
24
'This information is not available on the web' );
24
25
return ;
25
26
}
@@ -29,15 +30,16 @@ class DeviceSecurity extends EnsembleAction with Invokable {
29
30
bool isRooted = await Rjsniffer .amICompromised () ?? false ;
30
31
bool isDebugged = await Rjsniffer .amIDebugged () ?? false ;
31
32
bool isEmulator = await Rjsniffer .amIEmulator () ?? false ;
33
+ bool hasCorrectlyInstalled = await FlutterSecurityChecker .hasCorrectlyInstalled;
32
34
33
- _handleSuccess (context, isRooted, isDebugged, isEmulator, 'success' );
35
+ _handleSuccess (context, isRooted, isDebugged, isEmulator, hasCorrectlyInstalled, 'success' );
34
36
} catch (e) {
35
37
_handleError (context, e);
36
38
}
37
39
}
38
40
39
41
void _handleSuccess (BuildContext context, bool isRooted, bool isDebugged,
40
- bool isEmulator, String message) {
42
+ bool isEmulator, bool hasCorrectlyInstalled, String message) {
41
43
if (onSuccess != null ) {
42
44
ScreenController ().executeAction (
43
45
context,
@@ -48,6 +50,7 @@ class DeviceSecurity extends EnsembleAction with Invokable {
48
50
'debugged' : isDebugged,
49
51
'rooted' : isRooted,
50
52
'emulator' : isEmulator,
53
+ 'correctlyInstalled' : hasCorrectlyInstalled,
51
54
'message' : message,
52
55
},
53
56
),
0 commit comments