如何检测 Flutter 中开发者选项的启用或禁用?

问题描述 投票:0回答:1

在我的应用程序中,我想显示开发人员模式是否打开,然后显示一个屏幕以限制开发人员模式

我在Flutter中的应用

我尝试从设置中获取 devoption 值 int devOptions =Settings.Secure.getInt(this.getContentResolver(),Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0);

ios flutter mobile
1个回答
0
投票

您可以使用以下套件:

依赖关系:
flutter_jailbreak_detection:^1.8.0

并像这样使用(目前仅适用于Android):

bool developerMode = await FlutterJailbreakDetection.developerMode;
© www.soinside.com 2019 - 2024. All rights reserved.