Add support for prevent screen capture

This commit is contained in:
2023-09-22 17:28:33 +08:00
parent 50ff4b3fdd
commit 286e2fbb5b
7 changed files with 102 additions and 2 deletions

View File

@@ -151,6 +151,9 @@ void main() async {
await windowManager.ensureInitialized();
}
await initLogger();
if (prefs.getBool("preventScreenCapture") ?? false) {
await platformDisplay.enableProtect();
}
GoRouter.optionURLReflectsImperativeAPIs = true;
runApp(const MainApp());
}