Rooted Device Check #1
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:jailbreak_root_detection/jailbreak_root_detection.dart';
|
||||
import 'package:kmobile/rooted_screen.dart';
|
||||
import 'di/injection.dart';
|
||||
import 'app.dart';
|
||||
|
||||
@@ -14,5 +16,17 @@ void main() async {
|
||||
|
||||
// Initialize dependencies
|
||||
await setupDependencies();
|
||||
|
||||
final isJailBroken = await JailbreakRootDetection.instance.isJailBroken;
|
||||
final isRealDevice = await JailbreakRootDetection.instance.isRealDevice;
|
||||
if(isJailBroken || !isRealDevice){
|
||||
runApp(const MaterialApp(
|
||||
home: RootedScreen(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
)
|
||||
);
|
||||
}
|
||||
else{
|
||||
runApp(const KMobile());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user