4/21/6
This commit is contained in:
3
.env
3
.env
@@ -26,4 +26,5 @@ agoraAppCertificate=j17q944u49390q758u1649448q2y6xfuXrXlBl
|
||||
usernamePayMob=37319104052XrXlBl
|
||||
passwordPayMob='g@nkD2#99!hD_.wXrXlBl'
|
||||
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 */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
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 */; };
|
||||
C6B15AA12B5FB24600746405 /* order.wav in Resources */ = {isa = PBXBuildFile; fileRef = C6B15A9F2B5FB24600746405 /* order.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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@@ -153,6 +165,12 @@
|
||||
C69588332A8C1F6B00C3AC67 /* Runner.entitlements */,
|
||||
C6B15A9F2B5FB24600746405 /* order.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 */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
@@ -272,11 +290,17 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
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 */,
|
||||
C624C4682BD56D34002834AF /* cancel.wav in Resources */,
|
||||
C6B15AA12B5FB24600746405 /* order.wav in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
C690B4752A80554500E1D66E /* GoogleService-Info.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
C624C4692BD56D34002834AF /* iphone_ringtone.wav in Resources */,
|
||||
C624C4642BD56D34002834AF /* tone1.mp3 in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
@@ -50,4 +50,6 @@ class AK {
|
||||
a.r(a.r(a.r(Env.usernamePayMob, cn), cC), cs);
|
||||
static final String payMobApikey =
|
||||
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';
|
||||
|
||||
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 llama = 'https://api.llama-api.com/chat/completions';
|
||||
static String gemini =
|
||||
|
||||
@@ -51,7 +51,7 @@ class LoginCaptinController extends GetxController {
|
||||
if (jsonDecoeded.isNotEmpty) {
|
||||
if (jsonDecoeded['status'] == 'success') {
|
||||
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.emailDriver, jsonDecoeded['data'][0]['email']);
|
||||
box.write(
|
||||
|
||||
@@ -48,20 +48,20 @@ class LoginController extends GetxController {
|
||||
if (formKeyAdmin.currentState!.validate()) {
|
||||
await DeviceInfoPlus.getDeviceInfo();
|
||||
if (Platform.isAndroid) {
|
||||
print(DeviceInfoPlus.deviceData['serialNumber']);
|
||||
var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
||||
'device_number': DeviceInfoPlus.deviceData['serialNumber'].toString(),
|
||||
});
|
||||
var d = jsonDecode(res);
|
||||
// print(d);
|
||||
// if (DeviceInfoPlus.deviceData['serialNumber'] ==
|
||||
// print(DeviceInfoPlus.deviceDataList['serialNumber']);
|
||||
// var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
||||
// // 'device_number': DeviceInfoPlus.deviceData['serialNumber'].toString(),
|
||||
// });
|
||||
// var d = jsonDecode(res);
|
||||
// // print(d);
|
||||
// // if (DeviceInfoPlus.deviceData['serialNumber'] ==
|
||||
// d['message']['device_number']) {
|
||||
Get.back();
|
||||
Get.to(() => const AdminHomePage());
|
||||
// }
|
||||
}
|
||||
if (Platform.isIOS) {
|
||||
print(DeviceInfoPlus.deviceData['identifierForVendor']);
|
||||
// print(DeviceInfoPlus.deviceData['identifierForVendor']);
|
||||
// var res = await CRUD().get(link: AppLink.getAdminUser, payload: {
|
||||
// 'device_number': DeviceInfoPlus.deviceData['identifierForVendor'].toString(),
|
||||
// });
|
||||
|
||||
@@ -24,9 +24,9 @@ class CRUD {
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
},
|
||||
);
|
||||
// print("-----request----" + response.request.toString());
|
||||
print("-----request----" + response.request.toString());
|
||||
// print("-----headers-----" + response.headers.toString());
|
||||
// print("-----payload-----" + payload.toString());
|
||||
print("-----payload-----" + payload.toString());
|
||||
// if (response.statusCode == 200) {
|
||||
// print(response.body);
|
||||
var jsonData = jsonDecode(response.body);
|
||||
@@ -170,11 +170,11 @@ class CRUD {
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||
},
|
||||
);
|
||||
// print(response.request);
|
||||
// print(payload);
|
||||
print(response.request);
|
||||
print(payload);
|
||||
|
||||
var jsonData = jsonDecode(response.body);
|
||||
// print(jsonData);
|
||||
print(jsonData);
|
||||
if (response.statusCode == 200) {
|
||||
if (jsonData['status'] == 'success') {
|
||||
return response.body;
|
||||
|
||||
@@ -3,67 +3,102 @@ import 'dart:io';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
|
||||
class DeviceInfoPlus {
|
||||
static Map<String, dynamic> deviceData = {};
|
||||
static Future<Map<String, dynamic>> getDeviceInfo() async {
|
||||
static List<Map<String, dynamic>> deviceDataList = [];
|
||||
|
||||
static Future<List<Map<String, dynamic>>> getDeviceInfo() async {
|
||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
|
||||
try {
|
||||
if (Platform.isAndroid) {
|
||||
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
deviceData['platform'] = 'Android';
|
||||
deviceData['brand'] = androidInfo.brand;
|
||||
deviceData['model'] = androidInfo.model;
|
||||
deviceData['androidId'] = androidInfo.device;
|
||||
deviceData['version'] = androidInfo.version.release;
|
||||
deviceData['sdkVersion'] = androidInfo.version.sdkInt;
|
||||
deviceData['manufacturer'] = androidInfo.manufacturer;
|
||||
deviceData['isPhysicalDevice'] = androidInfo.isPhysicalDevice;
|
||||
deviceData['serialNumber'] = androidInfo.serialNumber;
|
||||
deviceData['fingerprint'] = androidInfo.fingerprint;
|
||||
deviceData['type'] = androidInfo.type;
|
||||
deviceData['data'] = androidInfo.data;
|
||||
deviceData['version'] = androidInfo.version;
|
||||
deviceData['tags'] = androidInfo.tags;
|
||||
deviceData['display'] = androidInfo.display;
|
||||
Map<String, dynamic> deviceData = {
|
||||
'platform': 'Android',
|
||||
'brand': androidInfo.brand,
|
||||
'model': androidInfo.model,
|
||||
'androidId': androidInfo.device,
|
||||
'versionRelease': androidInfo.version.release,
|
||||
'sdkVersion': androidInfo.version.sdkInt,
|
||||
'manufacturer': androidInfo.manufacturer,
|
||||
'isPhysicalDevice': androidInfo.isPhysicalDevice,
|
||||
'serialNumber': androidInfo.serialNumber,
|
||||
'fingerprint': androidInfo.fingerprint,
|
||||
'type': androidInfo.type,
|
||||
'data': androidInfo.data,
|
||||
'version': androidInfo.version,
|
||||
'tags': androidInfo.tags,
|
||||
'display': androidInfo.display,
|
||||
};
|
||||
deviceDataList.add(deviceData);
|
||||
} else if (Platform.isIOS) {
|
||||
IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo;
|
||||
deviceData['brand'] = 'Apple';
|
||||
deviceData['model'] = iosInfo.model;
|
||||
deviceData['systemName'] = iosInfo.systemName;
|
||||
deviceData['systemVersion'] = iosInfo.systemVersion;
|
||||
deviceData['utsname'] = iosInfo.utsname;
|
||||
deviceData['isPhysicalDevice'] = iosInfo.isPhysicalDevice;
|
||||
deviceData['identifierForVendor'] = iosInfo.identifierForVendor;
|
||||
deviceData['name'] = iosInfo.name;
|
||||
deviceData['localizedModel'] = iosInfo.localizedModel;
|
||||
Map<String, dynamic> deviceData = {
|
||||
'brand': 'Apple',
|
||||
'model': iosInfo.model,
|
||||
'systemName': iosInfo.systemName,
|
||||
'systemVersion': iosInfo.systemVersion,
|
||||
'utsname': iosInfo.utsname,
|
||||
'isPhysicalDevice': iosInfo.isPhysicalDevice,
|
||||
'identifierForVendor': iosInfo.identifierForVendor,
|
||||
'name': iosInfo.name,
|
||||
'localizedModel': iosInfo.localizedModel,
|
||||
};
|
||||
deviceDataList.add(deviceData);
|
||||
} else if (Platform.isMacOS) {
|
||||
MacOsDeviceInfo macInfo = await deviceInfoPlugin.macOsInfo;
|
||||
deviceData['platform'] = 'macOS';
|
||||
deviceData['model'] = macInfo.model;
|
||||
deviceData['version'] = macInfo.systemGUID;
|
||||
Map<String, dynamic> deviceData = {
|
||||
'platform': 'macOS',
|
||||
'model': macInfo.model,
|
||||
'version': macInfo.systemGUID,
|
||||
};
|
||||
deviceDataList.add(deviceData);
|
||||
} else if (Platform.isWindows) {
|
||||
WindowsDeviceInfo windowsInfo = await deviceInfoPlugin.windowsInfo;
|
||||
deviceData['platform'] = 'Windows';
|
||||
deviceData['manufacturer'] = windowsInfo.computerName;
|
||||
deviceData['version'] = windowsInfo.majorVersion;
|
||||
deviceData['deviceId'] = windowsInfo.deviceId;
|
||||
deviceData['userName'] = windowsInfo.userName;
|
||||
deviceData['productName'] = windowsInfo.productName;
|
||||
deviceData['installDate'] = windowsInfo.installDate;
|
||||
deviceData['productId'] = windowsInfo.productId;
|
||||
deviceData['numberOfCores'] = windowsInfo.numberOfCores;
|
||||
deviceData['systemMemoryInMegabytes'] =
|
||||
windowsInfo.systemMemoryInMegabytes;
|
||||
Map<String, dynamic> deviceData = {
|
||||
'platform': 'Windows',
|
||||
'manufacturer': windowsInfo.computerName,
|
||||
'version': windowsInfo.majorVersion,
|
||||
'deviceId': windowsInfo.deviceId,
|
||||
'userName': windowsInfo.userName,
|
||||
'productName': windowsInfo.productName,
|
||||
'installDate': windowsInfo.installDate,
|
||||
'productId': windowsInfo.productId,
|
||||
'numberOfCores': windowsInfo.numberOfCores,
|
||||
'systemMemoryInMegabytes': windowsInfo.systemMemoryInMegabytes,
|
||||
};
|
||||
deviceDataList.add(deviceData);
|
||||
} else if (Platform.isLinux) {
|
||||
LinuxDeviceInfo linuxInfo = await deviceInfoPlugin.linuxInfo;
|
||||
deviceData['platform'] = 'Linux';
|
||||
deviceData['manufacturer'] = linuxInfo.name;
|
||||
deviceData['version'] = linuxInfo.version;
|
||||
Map<String, dynamic> deviceData = {
|
||||
'platform': 'Linux',
|
||||
'manufacturer': linuxInfo.name,
|
||||
'version': linuxInfo.version,
|
||||
};
|
||||
deviceDataList.add(deviceData);
|
||||
}
|
||||
} catch (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('Longitude: ${_locationData.longitude}');
|
||||
// print('Time: ${_locationData.time}');
|
||||
// print('speed: ${_locationData.speed}');
|
||||
print('speed: ${_locationData.speed}');
|
||||
// print('Heading: ${_locationData.heading}');
|
||||
// isLoading = false;
|
||||
update();
|
||||
|
||||
@@ -2507,9 +2507,7 @@ class MapPassengerController extends GetxController {
|
||||
link: AppLink.getPassengerRate,
|
||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||
if (res != 'failure') {
|
||||
passengerRate = jsonDecode(res)['message']['rating'] == null
|
||||
? 5
|
||||
: jsonDecode(res)['message']['rating'].toDouble();
|
||||
passengerRate = double.parse(jsonDecode(res)['message']['rating']) ?? 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import 'constant/credential.dart';
|
||||
import 'constant/info.dart';
|
||||
import 'controller/firebase/firbase_messge.dart';
|
||||
import 'controller/firebase/local_notification.dart';
|
||||
import 'controller/functions/device_info.dart';
|
||||
import 'controller/functions/location_background_controller.dart';
|
||||
import 'controller/local/local_controller.dart';
|
||||
import 'controller/local/translations.dart';
|
||||
@@ -103,10 +104,16 @@ void main() async {
|
||||
PaymobPaymentWallet.instance.initialize(
|
||||
apiKey: AK
|
||||
.payMobApikey, // from dashboard Select Settings -> Account Info -> API Key
|
||||
integrationID: 4556056, //int.parse(AK.integrationIdPayMob),
|
||||
integrationID: int.parse(AK.integrationIdPayMobWallet),
|
||||
userTokenExpiration: 200,
|
||||
iFrameID: 837992,
|
||||
);
|
||||
// Get device information
|
||||
List<Map<String, dynamic>> deviceDataList =
|
||||
await DeviceInfoPlus.getDeviceInfo();
|
||||
|
||||
// Print all device data
|
||||
DeviceInfoPlus.printDeviceInfo();
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
@@ -64,10 +64,10 @@ class AdminHomePage extends StatelessWidget {
|
||||
AdminWidgetsDashBoard(
|
||||
title: 'Add device to be Admin',
|
||||
onPressed: () async {
|
||||
Map device = DeviceInfoPlus.deviceData;
|
||||
// Map device = DeviceInfoPlus.deviceData;
|
||||
// print(device);
|
||||
await CRUD().post(link: AppLink.addAdminUser, payload: {
|
||||
'deviceNumber': device['serialNumber'].toString(),
|
||||
// 'deviceNumber': device['serialNumber'].toString(),
|
||||
'name': 'b',
|
||||
});
|
||||
}),
|
||||
|
||||
@@ -53,7 +53,7 @@ class DrawerCaptain extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
box.read(BoxName.nameDriver),
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const Spacer(),
|
||||
|
||||
@@ -4,7 +4,10 @@ import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.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/credential.dart';
|
||||
import '../../../../../controller/functions/audio_recorder_controller.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
@@ -25,9 +28,22 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
AudioController audio = Get.put(AudioController());
|
||||
audio.startRecording();
|
||||
|
||||
// AudioController audio = Get.put(AudioController());
|
||||
// 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()));
|
||||
// ZonesController mapDriverController =
|
||||
// Get.put(ZonesController());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -425,9 +426,24 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
Get.defaultDialog(
|
||||
title: 'Reject Order'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
middleText:
|
||||
'You can decline a request without any cost'.tr,
|
||||
middleTextStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
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(
|
||||
title: 'Ok'.tr,
|
||||
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/main.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/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.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/main.dart';
|
||||
|
||||
import '../../../constant/api_key.dart';
|
||||
import '../../../constant/char_map.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/credential.dart';
|
||||
import '../../../controller/functions/tts.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
|
||||
@@ -112,8 +115,22 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
await PaymentController()
|
||||
.payWithPayMobWallet(context, '100', 'EGP', () {});
|
||||
// await PaymentController()
|
||||
// .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.name));
|
||||
// print(box.read(BoxName.phone));
|
||||
|
||||
Reference in New Issue
Block a user