@@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
55import 'package:flutter/material.dart' ;
66import 'package:root_jailbreak_sniffer/rjsniffer.dart' ;
77import 'package:ensemble_ts_interpreter/invokables/invokable.dart' ;
8+ import 'package:flutter_security_checker/flutter_security_checker.dart' ;
89import 'package:ensemble/framework/event.dart' ;
910
1011class DeviceSecurity extends EnsembleAction with Invokable {
@@ -19,7 +20,7 @@ class DeviceSecurity extends EnsembleAction with Invokable {
1920 @override
2021 Future <void > execute (BuildContext context, ScopeManager scopeManager) async {
2122 if (kIsWeb) {
22- _handleSuccess (context, false , false , false ,
23+ _handleSuccess (context, false , false , false ,false ,
2324 'This information is not available on the web' );
2425 return ;
2526 }
@@ -29,15 +30,16 @@ class DeviceSecurity extends EnsembleAction with Invokable {
2930 bool isRooted = await Rjsniffer .amICompromised () ?? false ;
3031 bool isDebugged = await Rjsniffer .amIDebugged () ?? false ;
3132 bool isEmulator = await Rjsniffer .amIEmulator () ?? false ;
33+ bool hasCorrectlyInstalled = await FlutterSecurityChecker .hasCorrectlyInstalled;
3234
33- _handleSuccess (context, isRooted, isDebugged, isEmulator, 'success' );
35+ _handleSuccess (context, isRooted, isDebugged, isEmulator, hasCorrectlyInstalled, 'success' );
3436 } catch (e) {
3537 _handleError (context, e);
3638 }
3739 }
3840
3941 void _handleSuccess (BuildContext context, bool isRooted, bool isDebugged,
40- bool isEmulator, String message) {
42+ bool isEmulator, bool hasCorrectlyInstalled, String message) {
4143 if (onSuccess != null ) {
4244 ScreenController ().executeAction (
4345 context,
@@ -48,6 +50,7 @@ class DeviceSecurity extends EnsembleAction with Invokable {
4850 'debugged' : isDebugged,
4951 'rooted' : isRooted,
5052 'emulator' : isEmulator,
53+ 'correctlyInstalled' : hasCorrectlyInstalled,
5154 'message' : message,
5255 },
5356 ),
0 commit comments