Worklog, anti geo spoofing and UI Polish

This commit is contained in:
2026-05-05 05:51:19 +08:00
parent d068887354
commit ccedf6e5f0
15 changed files with 2589 additions and 45 deletions
+17
View File
@@ -0,0 +1,17 @@
import 'dart:io';
import 'package:safe_device/safe_device.dart';
/// Returns true if the device appears compromised for attendance purposes:
/// rooted (Android) / jailbroken (iOS), or developer mode enabled.
/// Returns false on any error so a detection failure never blocks a valid user.
Future<bool> isDeviceCompromised() async {
if (!Platform.isAndroid && !Platform.isIOS) return false;
try {
final isJailBroken = await SafeDevice.isJailBroken;
final isDeveloperMode = await SafeDevice.isDevelopmentModeEnable;
return isJailBroken || isDeveloperMode;
} catch (_) {
return false;
}
}