25-3/12/1
This commit is contained in:
@@ -17,6 +17,8 @@ import 'package:sefer_driver/controller/home/captin/home_captain_controller.dart
|
||||
import '../../../../../constant/colors.dart';
|
||||
import '../../../../../controller/functions/face_detect.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
import '../../../../../controller/functions/package_info.dart';
|
||||
import '../../../../../controller/functions/security_checks.dart';
|
||||
import '../../../../../print.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
|
||||
@@ -110,30 +112,13 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
child: Builder(builder: (context) {
|
||||
return IconButton(
|
||||
onPressed: () async {
|
||||
// String shortHash(String password) {
|
||||
// var bytes = utf8.encode(password);
|
||||
// var digest = sha256.convert(bytes);
|
||||
// return base64UrlEncode(digest.bytes);
|
||||
// }
|
||||
final random = Random();
|
||||
|
||||
// String password =
|
||||
// '${EncryptionHelper.instance.decryptData(box.read(BoxName.emailDriver))}${box.read(BoxName.driverID)}';
|
||||
// String hashedPassword = shortHash(password);
|
||||
// Log.print('password: ${password}');
|
||||
// print("Hashed Password: $hashedPassword");
|
||||
Location location = Location();
|
||||
LocationData _locationData = await location.getLocation();
|
||||
Log.print('location: ${_locationData}');
|
||||
print(
|
||||
'Location: ${controller.myLocation.latitude}, ${controller.myLocation.longitude}');
|
||||
var status1 = await Permission.location.status;
|
||||
Log.print('status1: ${status1}');
|
||||
// if (status1.isGranted) {
|
||||
await LocationController().startLocationUpdates();
|
||||
// } else {
|
||||
// // openAppSettings();
|
||||
// await Permission.locationAlways.request();
|
||||
// }
|
||||
if (random.nextBool()) {
|
||||
await SecurityHelper.performSecurityChecks();
|
||||
} else {
|
||||
await SecurityChecks.isDeviceRootedFromNative(Get.context!);
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome5.grin_tears,
|
||||
|
||||
Reference in New Issue
Block a user