2026-02-19
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user