palestine_trusted_device 0.0.1 palestine_trusted_device: ^0.0.1 copied to clipboard
Check if the device is trustworthy, rooted, jailbroken, developer mode is on, ...etc.
import 'dart:developer' as developer;
import 'package:flutter/material.dart';
import 'package:palestine_trusted_device/palestine_trusted_device.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
PalestineTrustedDevice.check(
checkRealDevice: true,
checkDevMode: false,
checkOnExternalStorage: false,
checkRooted: true,
onFail: () {
developer.log('Not Secure Env - Closing App..');
},
);
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: const Center(
child: Text('Running on'),
),
),
);
}
}