2026-02-19

This commit is contained in:
Hamza-Ayed
2026-02-19 00:33:43 +03:00
parent 38f7abcd59
commit 0b826f6e01
15 changed files with 57 additions and 52 deletions

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -12,7 +13,9 @@ import '../../main.dart';
import '../../onbording_page.dart';
import '../../print.dart';
import '../functions/encrypt_decrypt.dart';
import '../functions/package_info.dart';
import '../functions/secure_storage.dart';
import '../functions/security_checks.dart';
// Assuming you have a home page to navigate to after successful login.
// If not, you might need to adjust the navigation target.
@@ -32,6 +35,17 @@ class SplashScreenController extends GetxController
super.onInit();
_setupAnimations();
_initializeAndNavigate();
checkSecurity();
}
checkSecurity() async {
final random = Random();
if (random.nextBool()) {
await SecurityHelper.performSecurityChecks();
} else {
await SecurityChecks.isDeviceRootedFromNative(Get.context!);
}
}
void _setupAnimations() {