4/21/6
This commit is contained in:
1
.env
1
.env
@@ -27,3 +27,4 @@ usernamePayMob=37319104052XrXlBl
|
|||||||
passwordPayMob='g@nkD2#99!hD_.wXrXlBl'
|
passwordPayMob='g@nkD2#99!hD_.wXrXlBl'
|
||||||
integrationIdPayMob=0552355XrXlBl
|
integrationIdPayMob=0552355XrXlBl
|
||||||
payMobApikey='MDrGqKEWS1rVqHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=XrXlBl'
|
payMobApikey='MDrGqKEWS1rVqHvEPDvPjJ7vZDBExrO7S3BEBgrlfUwTA3i5RnP5ZnvoL3M2S9rEBgrlNTdexH5pTPf7NJrvy1reZJv1Tn7zf7vTIDywjHg1C7Ley38HTDyNA3v7TPfdxJrax1rwPmPtMJyzqKEYZeghq3MuLUrFH3A1AgHcH15CZ9UaZTLOxnw0BTdzHHrBArisZerUMUUzZ1BnBeEijHvNjYLnS1BUICMhSmPhA15ifHyVqKEMHWyKLbyuIPvcH9UeL3vZyDf=XrXlBl'
|
||||||
|
integrationIdPayMobWallet=0552352XrXlBl
|
||||||
@@ -15,6 +15,12 @@
|
|||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
|
C624C4642BD56D34002834AF /* tone1.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = C624C45C2BD56D34002834AF /* tone1.mp3 */; };
|
||||||
|
C624C4652BD56D34002834AF /* start.wav in Resources */ = {isa = PBXBuildFile; fileRef = C624C45D2BD56D34002834AF /* start.wav */; };
|
||||||
|
C624C4672BD56D34002834AF /* promo.wav in Resources */ = {isa = PBXBuildFile; fileRef = C624C45F2BD56D34002834AF /* promo.wav */; };
|
||||||
|
C624C4682BD56D34002834AF /* cancel.wav in Resources */ = {isa = PBXBuildFile; fileRef = C624C4602BD56D34002834AF /* cancel.wav */; };
|
||||||
|
C624C4692BD56D34002834AF /* iphone_ringtone.wav in Resources */ = {isa = PBXBuildFile; fileRef = C624C4612BD56D34002834AF /* iphone_ringtone.wav */; };
|
||||||
|
C624C46A2BD56D34002834AF /* order1.wav in Resources */ = {isa = PBXBuildFile; fileRef = C624C4622BD56D34002834AF /* order1.wav */; };
|
||||||
C690B4752A80554500E1D66E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C690B4742A80554500E1D66E /* GoogleService-Info.plist */; };
|
C690B4752A80554500E1D66E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C690B4742A80554500E1D66E /* GoogleService-Info.plist */; };
|
||||||
C6B15AA12B5FB24600746405 /* order.wav in Resources */ = {isa = PBXBuildFile; fileRef = C6B15A9F2B5FB24600746405 /* order.wav */; };
|
C6B15AA12B5FB24600746405 /* order.wav in Resources */ = {isa = PBXBuildFile; fileRef = C6B15A9F2B5FB24600746405 /* order.wav */; };
|
||||||
C6B15AA22B5FB24600746405 /* tone2.wav in Resources */ = {isa = PBXBuildFile; fileRef = C6B15AA02B5FB24600746405 /* tone2.wav */; };
|
C6B15AA22B5FB24600746405 /* tone2.wav in Resources */ = {isa = PBXBuildFile; fileRef = C6B15AA02B5FB24600746405 /* tone2.wav */; };
|
||||||
@@ -66,6 +72,12 @@
|
|||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
C624C45C2BD56D34002834AF /* tone1.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = tone1.mp3; path = ../../android/app/src/main/res/raw/tone1.mp3; sourceTree = "<group>"; };
|
||||||
|
C624C45D2BD56D34002834AF /* start.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = start.wav; path = ../../android/app/src/main/res/raw/start.wav; sourceTree = "<group>"; };
|
||||||
|
C624C45F2BD56D34002834AF /* promo.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = promo.wav; path = ../../android/app/src/main/res/raw/promo.wav; sourceTree = "<group>"; };
|
||||||
|
C624C4602BD56D34002834AF /* cancel.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = cancel.wav; path = ../../android/app/src/main/res/raw/cancel.wav; sourceTree = "<group>"; };
|
||||||
|
C624C4612BD56D34002834AF /* iphone_ringtone.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = iphone_ringtone.wav; path = ../../android/app/src/main/res/raw/iphone_ringtone.wav; sourceTree = "<group>"; };
|
||||||
|
C624C4622BD56D34002834AF /* order1.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = order1.wav; path = ../../android/app/src/main/res/raw/order1.wav; sourceTree = "<group>"; };
|
||||||
C690B4742A80554500E1D66E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
C690B4742A80554500E1D66E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
|
||||||
C69588332A8C1F6B00C3AC67 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
C69588332A8C1F6B00C3AC67 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
|
||||||
C6B15A9F2B5FB24600746405 /* order.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = order.wav; sourceTree = "<group>"; };
|
C6B15A9F2B5FB24600746405 /* order.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = order.wav; sourceTree = "<group>"; };
|
||||||
@@ -153,6 +165,12 @@
|
|||||||
C69588332A8C1F6B00C3AC67 /* Runner.entitlements */,
|
C69588332A8C1F6B00C3AC67 /* Runner.entitlements */,
|
||||||
C6B15A9F2B5FB24600746405 /* order.wav */,
|
C6B15A9F2B5FB24600746405 /* order.wav */,
|
||||||
C6B15AA02B5FB24600746405 /* tone2.wav */,
|
C6B15AA02B5FB24600746405 /* tone2.wav */,
|
||||||
|
C624C4602BD56D34002834AF /* cancel.wav */,
|
||||||
|
C624C4612BD56D34002834AF /* iphone_ringtone.wav */,
|
||||||
|
C624C4622BD56D34002834AF /* order1.wav */,
|
||||||
|
C624C45F2BD56D34002834AF /* promo.wav */,
|
||||||
|
C624C45D2BD56D34002834AF /* start.wav */,
|
||||||
|
C624C45C2BD56D34002834AF /* tone1.mp3 */,
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
@@ -272,11 +290,17 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
C6B15AA22B5FB24600746405 /* tone2.wav in Resources */,
|
C6B15AA22B5FB24600746405 /* tone2.wav in Resources */,
|
||||||
|
C624C4652BD56D34002834AF /* start.wav in Resources */,
|
||||||
|
C624C4672BD56D34002834AF /* promo.wav in Resources */,
|
||||||
|
C624C46A2BD56D34002834AF /* order1.wav in Resources */,
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
|
C624C4682BD56D34002834AF /* cancel.wav in Resources */,
|
||||||
C6B15AA12B5FB24600746405 /* order.wav in Resources */,
|
C6B15AA12B5FB24600746405 /* order.wav in Resources */,
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
C690B4752A80554500E1D66E /* GoogleService-Info.plist in Resources */,
|
C690B4752A80554500E1D66E /* GoogleService-Info.plist in Resources */,
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
|
C624C4692BD56D34002834AF /* iphone_ringtone.wav in Resources */,
|
||||||
|
C624C4642BD56D34002834AF /* tone1.mp3 in Resources */,
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
|||||||
@@ -50,4 +50,6 @@ class AK {
|
|||||||
a.r(a.r(a.r(Env.usernamePayMob, cn), cC), cs);
|
a.r(a.r(a.r(Env.usernamePayMob, cn), cC), cs);
|
||||||
static final String payMobApikey =
|
static final String payMobApikey =
|
||||||
a.r(a.r(a.r(Env.payMobApikey, cn), cC), cs);
|
a.r(a.r(a.r(Env.payMobApikey, cn), cC), cs);
|
||||||
|
static final String integrationIdPayMobWallet =
|
||||||
|
a.r(a.r(a.r(Env.integrationIdPayMobWallet, cn), cC), cs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:SEFER/env/env.dart';
|
import 'package:SEFER/env/env.dart';
|
||||||
|
|
||||||
class AppLink {
|
class AppLink {
|
||||||
static final String server = 'https://api.sefer.live/sefer'; // Env.serverPHP;
|
static final String server = Env.serverPHP;
|
||||||
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
||||||
static String llama = 'https://api.llama-api.com/chat/completions';
|
static String llama = 'https://api.llama-api.com/chat/completions';
|
||||||
static String gemini =
|
static String gemini =
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class LoginCaptinController extends GetxController {
|
|||||||
if (jsonDecoeded.isNotEmpty) {
|
if (jsonDecoeded.isNotEmpty) {
|
||||||
if (jsonDecoeded['status'] == 'success') {
|
if (jsonDecoeded['status'] == 'success') {
|
||||||
print(jsonDecoeded['data'][0]['verified']);
|
print(jsonDecoeded['data'][0]['verified']);
|
||||||
if (jsonDecoeded['data'][0]['verified'] == 1) {
|
if (jsonDecoeded['data'][0]['verified'] == '1') {
|
||||||
box.write(BoxName.driverID, jsonDecoeded['data'][0]['id']);
|
box.write(BoxName.driverID, jsonDecoeded['data'][0]['id']);
|
||||||
box.write(BoxName.emailDriver, jsonDecoeded['data'][0]['email']);
|
box.write(BoxName.emailDriver, jsonDecoeded['data'][0]['email']);
|
||||||
box.write(
|
box.write(
|
||||||
|
|||||||
@@ -48,20 +48,20 @@ class LoginController extends GetxController {
|
|||||||
if (formKeyAdmin.currentState!.validate()) {
|
if (formKeyAdmin.currentState!.validate()) {
|
||||||
await DeviceInfoPlus.getDeviceInfo();
|
await DeviceInfoPlus.getDeviceInfo();
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
print(DeviceInfoPlus.deviceData['serialNumber']);
|
// print(DeviceInfoPlus.deviceDataList['serialNumber']);
|
||||||
var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
// var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
||||||
'device_number': DeviceInfoPlus.deviceData['serialNumber'].toString(),
|
// // 'device_number': DeviceInfoPlus.deviceData['serialNumber'].toString(),
|
||||||
});
|
// });
|
||||||
var d = jsonDecode(res);
|
// var d = jsonDecode(res);
|
||||||
// print(d);
|
// // print(d);
|
||||||
// if (DeviceInfoPlus.deviceData['serialNumber'] ==
|
// // if (DeviceInfoPlus.deviceData['serialNumber'] ==
|
||||||
// d['message']['device_number']) {
|
// d['message']['device_number']) {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.to(() => const AdminHomePage());
|
Get.to(() => const AdminHomePage());
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
print(DeviceInfoPlus.deviceData['identifierForVendor']);
|
// print(DeviceInfoPlus.deviceData['identifierForVendor']);
|
||||||
// var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
// var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
||||||
// 'device_number': DeviceInfoPlus.deviceData['identifierForVendor'].toString(),
|
// 'device_number': DeviceInfoPlus.deviceData['identifierForVendor'].toString(),
|
||||||
// });
|
// });
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// print("-----request----" + response.request.toString());
|
print("-----request----" + response.request.toString());
|
||||||
// print("-----headers-----" + response.headers.toString());
|
// print("-----headers-----" + response.headers.toString());
|
||||||
// print("-----payload-----" + payload.toString());
|
print("-----payload-----" + payload.toString());
|
||||||
// if (response.statusCode == 200) {
|
// if (response.statusCode == 200) {
|
||||||
// print(response.body);
|
// print(response.body);
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
@@ -170,11 +170,11 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// print(response.request);
|
print(response.request);
|
||||||
// print(payload);
|
print(payload);
|
||||||
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
// print(jsonData);
|
print(jsonData);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
return response.body;
|
return response.body;
|
||||||
|
|||||||
@@ -3,67 +3,102 @@ import 'dart:io';
|
|||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
|
||||||
class DeviceInfoPlus {
|
class DeviceInfoPlus {
|
||||||
static Map<String, dynamic> deviceData = {};
|
static List<Map<String, dynamic>> deviceDataList = [];
|
||||||
static Future<Map<String, dynamic>> getDeviceInfo() async {
|
|
||||||
|
static Future<List<Map<String, dynamic>>> getDeviceInfo() async {
|
||||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
||||||
deviceData['platform'] = 'Android';
|
Map<String, dynamic> deviceData = {
|
||||||
deviceData['brand'] = androidInfo.brand;
|
'platform': 'Android',
|
||||||
deviceData['model'] = androidInfo.model;
|
'brand': androidInfo.brand,
|
||||||
deviceData['androidId'] = androidInfo.device;
|
'model': androidInfo.model,
|
||||||
deviceData['version'] = androidInfo.version.release;
|
'androidId': androidInfo.device,
|
||||||
deviceData['sdkVersion'] = androidInfo.version.sdkInt;
|
'versionRelease': androidInfo.version.release,
|
||||||
deviceData['manufacturer'] = androidInfo.manufacturer;
|
'sdkVersion': androidInfo.version.sdkInt,
|
||||||
deviceData['isPhysicalDevice'] = androidInfo.isPhysicalDevice;
|
'manufacturer': androidInfo.manufacturer,
|
||||||
deviceData['serialNumber'] = androidInfo.serialNumber;
|
'isPhysicalDevice': androidInfo.isPhysicalDevice,
|
||||||
deviceData['fingerprint'] = androidInfo.fingerprint;
|
'serialNumber': androidInfo.serialNumber,
|
||||||
deviceData['type'] = androidInfo.type;
|
'fingerprint': androidInfo.fingerprint,
|
||||||
deviceData['data'] = androidInfo.data;
|
'type': androidInfo.type,
|
||||||
deviceData['version'] = androidInfo.version;
|
'data': androidInfo.data,
|
||||||
deviceData['tags'] = androidInfo.tags;
|
'version': androidInfo.version,
|
||||||
deviceData['display'] = androidInfo.display;
|
'tags': androidInfo.tags,
|
||||||
|
'display': androidInfo.display,
|
||||||
|
};
|
||||||
|
deviceDataList.add(deviceData);
|
||||||
} else if (Platform.isIOS) {
|
} else if (Platform.isIOS) {
|
||||||
IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo;
|
IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo;
|
||||||
deviceData['brand'] = 'Apple';
|
Map<String, dynamic> deviceData = {
|
||||||
deviceData['model'] = iosInfo.model;
|
'brand': 'Apple',
|
||||||
deviceData['systemName'] = iosInfo.systemName;
|
'model': iosInfo.model,
|
||||||
deviceData['systemVersion'] = iosInfo.systemVersion;
|
'systemName': iosInfo.systemName,
|
||||||
deviceData['utsname'] = iosInfo.utsname;
|
'systemVersion': iosInfo.systemVersion,
|
||||||
deviceData['isPhysicalDevice'] = iosInfo.isPhysicalDevice;
|
'utsname': iosInfo.utsname,
|
||||||
deviceData['identifierForVendor'] = iosInfo.identifierForVendor;
|
'isPhysicalDevice': iosInfo.isPhysicalDevice,
|
||||||
deviceData['name'] = iosInfo.name;
|
'identifierForVendor': iosInfo.identifierForVendor,
|
||||||
deviceData['localizedModel'] = iosInfo.localizedModel;
|
'name': iosInfo.name,
|
||||||
|
'localizedModel': iosInfo.localizedModel,
|
||||||
|
};
|
||||||
|
deviceDataList.add(deviceData);
|
||||||
} else if (Platform.isMacOS) {
|
} else if (Platform.isMacOS) {
|
||||||
MacOsDeviceInfo macInfo = await deviceInfoPlugin.macOsInfo;
|
MacOsDeviceInfo macInfo = await deviceInfoPlugin.macOsInfo;
|
||||||
deviceData['platform'] = 'macOS';
|
Map<String, dynamic> deviceData = {
|
||||||
deviceData['model'] = macInfo.model;
|
'platform': 'macOS',
|
||||||
deviceData['version'] = macInfo.systemGUID;
|
'model': macInfo.model,
|
||||||
|
'version': macInfo.systemGUID,
|
||||||
|
};
|
||||||
|
deviceDataList.add(deviceData);
|
||||||
} else if (Platform.isWindows) {
|
} else if (Platform.isWindows) {
|
||||||
WindowsDeviceInfo windowsInfo = await deviceInfoPlugin.windowsInfo;
|
WindowsDeviceInfo windowsInfo = await deviceInfoPlugin.windowsInfo;
|
||||||
deviceData['platform'] = 'Windows';
|
Map<String, dynamic> deviceData = {
|
||||||
deviceData['manufacturer'] = windowsInfo.computerName;
|
'platform': 'Windows',
|
||||||
deviceData['version'] = windowsInfo.majorVersion;
|
'manufacturer': windowsInfo.computerName,
|
||||||
deviceData['deviceId'] = windowsInfo.deviceId;
|
'version': windowsInfo.majorVersion,
|
||||||
deviceData['userName'] = windowsInfo.userName;
|
'deviceId': windowsInfo.deviceId,
|
||||||
deviceData['productName'] = windowsInfo.productName;
|
'userName': windowsInfo.userName,
|
||||||
deviceData['installDate'] = windowsInfo.installDate;
|
'productName': windowsInfo.productName,
|
||||||
deviceData['productId'] = windowsInfo.productId;
|
'installDate': windowsInfo.installDate,
|
||||||
deviceData['numberOfCores'] = windowsInfo.numberOfCores;
|
'productId': windowsInfo.productId,
|
||||||
deviceData['systemMemoryInMegabytes'] =
|
'numberOfCores': windowsInfo.numberOfCores,
|
||||||
windowsInfo.systemMemoryInMegabytes;
|
'systemMemoryInMegabytes': windowsInfo.systemMemoryInMegabytes,
|
||||||
|
};
|
||||||
|
deviceDataList.add(deviceData);
|
||||||
} else if (Platform.isLinux) {
|
} else if (Platform.isLinux) {
|
||||||
LinuxDeviceInfo linuxInfo = await deviceInfoPlugin.linuxInfo;
|
LinuxDeviceInfo linuxInfo = await deviceInfoPlugin.linuxInfo;
|
||||||
deviceData['platform'] = 'Linux';
|
Map<String, dynamic> deviceData = {
|
||||||
deviceData['manufacturer'] = linuxInfo.name;
|
'platform': 'Linux',
|
||||||
deviceData['version'] = linuxInfo.version;
|
'manufacturer': linuxInfo.name,
|
||||||
|
'version': linuxInfo.version,
|
||||||
|
};
|
||||||
|
deviceDataList.add(deviceData);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Failed to get device info: $e');
|
print('Failed to get device info: $e');
|
||||||
}
|
}
|
||||||
|
|
||||||
return deviceData;
|
return deviceDataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to print all device data
|
||||||
|
static void printDeviceInfo() {
|
||||||
|
for (Map<String, dynamic> deviceData in deviceDataList) {
|
||||||
|
print('Platform: ${deviceData['platform']}');
|
||||||
|
print('Brand: ${deviceData['brand']}');
|
||||||
|
print('Model: ${deviceData['model']}');
|
||||||
|
print(
|
||||||
|
'Version: ${deviceData['version'] ?? deviceData['versionRelease'] ?? 'N/A'}');
|
||||||
|
print('Manufacturer: ${deviceData['manufacturer'] ?? 'N/A'}');
|
||||||
|
print('Is Physical Device: ${deviceData['isPhysicalDevice']}');
|
||||||
|
print('Serial Number: ${deviceData['serialNumber'] ?? 'N/A'}');
|
||||||
|
print('Fingerprint: ${deviceData['fingerprint'] ?? 'N/A'}');
|
||||||
|
print('Type: ${deviceData['type'] ?? 'N/A'}');
|
||||||
|
print('Data: ${deviceData['data'] ?? 'N/A'}');
|
||||||
|
print('Tags: ${deviceData['tags'] ?? 'N/A'}');
|
||||||
|
print('Display: ${deviceData['display'] ?? 'N/A'}');
|
||||||
|
print('--------------------');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class LocationController extends GetxController {
|
|||||||
// print('Latitude: ${_locationData.latitude}');
|
// print('Latitude: ${_locationData.latitude}');
|
||||||
// print('Longitude: ${_locationData.longitude}');
|
// print('Longitude: ${_locationData.longitude}');
|
||||||
// print('Time: ${_locationData.time}');
|
// print('Time: ${_locationData.time}');
|
||||||
// print('speed: ${_locationData.speed}');
|
print('speed: ${_locationData.speed}');
|
||||||
// print('Heading: ${_locationData.heading}');
|
// print('Heading: ${_locationData.heading}');
|
||||||
// isLoading = false;
|
// isLoading = false;
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -2507,9 +2507,7 @@ class MapPassengerController extends GetxController {
|
|||||||
link: AppLink.getPassengerRate,
|
link: AppLink.getPassengerRate,
|
||||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
passengerRate = jsonDecode(res)['message']['rating'] == null
|
passengerRate = double.parse(jsonDecode(res)['message']['rating']) ?? 5;
|
||||||
? 5
|
|
||||||
: jsonDecode(res)['message']['rating'].toDouble();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import 'constant/credential.dart';
|
|||||||
import 'constant/info.dart';
|
import 'constant/info.dart';
|
||||||
import 'controller/firebase/firbase_messge.dart';
|
import 'controller/firebase/firbase_messge.dart';
|
||||||
import 'controller/firebase/local_notification.dart';
|
import 'controller/firebase/local_notification.dart';
|
||||||
|
import 'controller/functions/device_info.dart';
|
||||||
import 'controller/functions/location_background_controller.dart';
|
import 'controller/functions/location_background_controller.dart';
|
||||||
import 'controller/local/local_controller.dart';
|
import 'controller/local/local_controller.dart';
|
||||||
import 'controller/local/translations.dart';
|
import 'controller/local/translations.dart';
|
||||||
@@ -103,10 +104,16 @@ void main() async {
|
|||||||
PaymobPaymentWallet.instance.initialize(
|
PaymobPaymentWallet.instance.initialize(
|
||||||
apiKey: AK
|
apiKey: AK
|
||||||
.payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
.payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
||||||
integrationID: 4556056, //int.parse(AK.integrationIdPayMob),
|
integrationID: int.parse(AK.integrationIdPayMobWallet),
|
||||||
userTokenExpiration: 200,
|
userTokenExpiration: 200,
|
||||||
iFrameID: 837992,
|
iFrameID: 837992,
|
||||||
);
|
);
|
||||||
|
// Get device information
|
||||||
|
List<Map<String, dynamic>> deviceDataList =
|
||||||
|
await DeviceInfoPlus.getDeviceInfo();
|
||||||
|
|
||||||
|
// Print all device data
|
||||||
|
DeviceInfoPlus.printDeviceInfo();
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ class AdminHomePage extends StatelessWidget {
|
|||||||
AdminWidgetsDashBoard(
|
AdminWidgetsDashBoard(
|
||||||
title: 'Add device to be Admin',
|
title: 'Add device to be Admin',
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Map device = DeviceInfoPlus.deviceData;
|
// Map device = DeviceInfoPlus.deviceData;
|
||||||
// print(device);
|
// print(device);
|
||||||
await CRUD().post(link: AppLink.addAdminUser, payload: {
|
await CRUD().post(link: AppLink.addAdminUser, payload: {
|
||||||
'deviceNumber': device['serialNumber'].toString(),
|
// 'deviceNumber': device['serialNumber'].toString(),
|
||||||
'name': 'b',
|
'name': 'b',
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class DrawerCaptain extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
box.read(BoxName.nameDriver),
|
box.read(BoxName.nameDriver).toString(),
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ import 'package:get/get.dart';
|
|||||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
|
|
||||||
|
import '../../../../../constant/api_key.dart';
|
||||||
|
import '../../../../../constant/char_map.dart';
|
||||||
import '../../../../../constant/colors.dart';
|
import '../../../../../constant/colors.dart';
|
||||||
|
import '../../../../../constant/credential.dart';
|
||||||
import '../../../../../controller/functions/audio_recorder_controller.dart';
|
import '../../../../../controller/functions/audio_recorder_controller.dart';
|
||||||
import '../../../../Rate/ride_calculate_driver.dart';
|
import '../../../../Rate/ride_calculate_driver.dart';
|
||||||
import '../../../../../controller/functions/location_controller.dart';
|
import '../../../../../controller/functions/location_controller.dart';
|
||||||
@@ -25,9 +28,22 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
|||||||
borderRadius: BorderRadius.circular(15)),
|
borderRadius: BorderRadius.circular(15)),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
AudioController audio = Get.put(AudioController());
|
// AudioController audio = Get.put(AudioController());
|
||||||
audio.startRecording();
|
// audio.startRecording();
|
||||||
|
// AC credentials = AC();
|
||||||
|
// String apiKey = '';
|
||||||
|
// String convertedStringN = credentials.c(
|
||||||
|
// credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||||
|
// print('Converted v: $convertedStringN');
|
||||||
|
//
|
||||||
|
// String retrievedStringS = credentials.r(
|
||||||
|
// credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||||
|
// cs);
|
||||||
|
// print('Retrieved String: $retrievedStringS');
|
||||||
|
// //
|
||||||
|
// if (retrievedStringS == apiKey) {
|
||||||
|
// print('same');
|
||||||
|
// }
|
||||||
// Get.to((OrderRequestPage()));
|
// Get.to((OrderRequestPage()));
|
||||||
// ZonesController mapDriverController =
|
// ZonesController mapDriverController =
|
||||||
// Get.put(ZonesController());
|
// Get.put(ZonesController());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:SEFER/controller/functions/tts.dart';
|
||||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -425,9 +426,24 @@ class OrderSpeedRequest extends StatelessWidget {
|
|||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Reject Order'.tr,
|
title: 'Reject Order'.tr,
|
||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
middleText:
|
content: Column(
|
||||||
'You can decline a request without any cost'.tr,
|
children: [
|
||||||
middleTextStyle: AppStyle.title,
|
IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await Get.find<TextToSpeechController>()
|
||||||
|
.speakText(
|
||||||
|
'You can decline a request without any cost'
|
||||||
|
.tr);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.headphones),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'You can decline a request without any cost'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Ok'.tr,
|
title: 'Ok'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
|||||||
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
||||||
import 'package:SEFER/main.dart';
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:SEFER/views/home/Captin/home_captain/widget/call_page.dart';
|
import 'package:SEFER/views/home/Captin/home_captain/widget/call_page.dart';
|
||||||
import 'package:SEFER/views/home/map_widget.dart/call_passenger_page.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
|
|||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:SEFER/main.dart';
|
import 'package:SEFER/main.dart';
|
||||||
|
|
||||||
|
import '../../../constant/api_key.dart';
|
||||||
|
import '../../../constant/char_map.dart';
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
|
import '../../../constant/credential.dart';
|
||||||
import '../../../controller/functions/tts.dart';
|
import '../../../controller/functions/tts.dart';
|
||||||
import '../../../controller/home/map_passenger_controller.dart';
|
import '../../../controller/home/map_passenger_controller.dart';
|
||||||
|
|
||||||
@@ -112,8 +115,22 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
borderRadius: BorderRadius.circular(15)),
|
borderRadius: BorderRadius.circular(15)),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await PaymentController()
|
// await PaymentController()
|
||||||
.payWithPayMobWallet(context, '100', 'EGP', () {});
|
// .payWithPayMobWallet(context, '100', 'EGP', () {});
|
||||||
|
AC credentials = AC();
|
||||||
|
String apiKey = AK.payPalSecret;
|
||||||
|
String convertedStringN = credentials.c(
|
||||||
|
credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||||
|
print('Converted v: $convertedStringN');
|
||||||
|
|
||||||
|
String retrievedStringS = credentials.r(
|
||||||
|
credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||||
|
cs);
|
||||||
|
print('Retrieved String: $retrievedStringS');
|
||||||
|
//
|
||||||
|
if (retrievedStringS == apiKey) {
|
||||||
|
print('same');
|
||||||
|
}
|
||||||
// print(box.read(BoxName.passengerWalletTotal));
|
// print(box.read(BoxName.passengerWalletTotal));
|
||||||
// print(box.read(BoxName.name));
|
// print(box.read(BoxName.name));
|
||||||
// print(box.read(BoxName.phone));
|
// print(box.read(BoxName.phone));
|
||||||
|
|||||||
Reference in New Issue
Block a user