25-2/24/1
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:Tripz/constant/style.dart';
|
||||
import 'package:Tripz/controller/functions/secure_storage.dart';
|
||||
import 'package:Tripz/views/widgets/my_scafold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:Tripz/views/auth/login_page.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
@@ -28,9 +30,19 @@ class SplashScreenController extends GetxController
|
||||
update();
|
||||
}
|
||||
|
||||
String iss = '';
|
||||
@override
|
||||
void onInit() {
|
||||
Future<void> onInit() async {
|
||||
super.onInit();
|
||||
|
||||
// storage.read(key: 'iss').then((s) {
|
||||
// // print(s);
|
||||
// iss = s!;
|
||||
// });
|
||||
// if (iss == null) {
|
||||
SecureStorage().saveData('iss', 'mobile-app:');
|
||||
// }
|
||||
|
||||
_getPackageInfo();
|
||||
_animationController = AnimationController(
|
||||
vsync: this,
|
||||
@@ -56,6 +68,12 @@ class SplashScreenController extends GetxController
|
||||
|
||||
if (elapsed >= totalTime) {
|
||||
timer.cancel();
|
||||
// await SecurityHelper.performSecurityChecks();
|
||||
// if (box.read('isNotTrust') ||
|
||||
// box.read('isJailBroken') ||
|
||||
// box.read('isTampered')) {
|
||||
// Get.to(() => SecurityPage());
|
||||
// } else {
|
||||
box.read(BoxName.onBoarding) == null
|
||||
? Get.off(() => OnBoardingPage())
|
||||
: box.read(BoxName.email) != null &&
|
||||
@@ -68,6 +86,7 @@ class SplashScreenController extends GetxController
|
||||
)
|
||||
: Get.off(() => LoginPage());
|
||||
}
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,3 +113,39 @@ class SplashScreenController extends GetxController
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
class SecurityPage extends StatelessWidget {
|
||||
const SecurityPage({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: "security_warning".tr,
|
||||
body: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"security_message".tr,
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
// await SecurityHelper.clearAllData();
|
||||
},
|
||||
child: Text(
|
||||
"security_warning".tr,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
isleading: false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user