6/22/2
This commit is contained in:
@@ -24,7 +24,6 @@ class AuthController extends GetxController {
|
|||||||
await _auth.signInWithCredential(credential);
|
await _auth.signInWithCredential(credential);
|
||||||
return userCredential.user;
|
return userCredential.user;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print("Error during Apple sign-in: $error");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class GoogleSignInHelper {
|
|||||||
}
|
}
|
||||||
return googleUser;
|
return googleUser;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print('Google Sign-In error: $error');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,7 +48,6 @@ class GoogleSignInHelper {
|
|||||||
}
|
}
|
||||||
return googleUser;
|
return googleUser;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print('Google Sign-In error: $error');
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,10 +57,7 @@ class GoogleSignInHelper {
|
|||||||
try {
|
try {
|
||||||
await _googleSignIn.signOut();
|
await _googleSignIn.signOut();
|
||||||
await _handleSignOut();
|
await _handleSignOut();
|
||||||
print('User signed out.');
|
} catch (error) {}
|
||||||
} catch (error) {
|
|
||||||
print('Google Sign-Out error: $error');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method to get the current signed-in user
|
// Method to get the current signed-in user
|
||||||
@@ -80,11 +75,6 @@ class GoogleSignInHelper {
|
|||||||
|
|
||||||
// Perform any additional sign-up tasks or API calls here
|
// Perform any additional sign-up tasks or API calls here
|
||||||
// For example, you can send the user data to your server for registration
|
// For example, you can send the user data to your server for registration
|
||||||
|
|
||||||
print('passengerID = ${box.read(BoxName.passengerID)}');
|
|
||||||
print('email = ${box.read(BoxName.email)}');
|
|
||||||
print('name = ${box.read(BoxName.name)}');
|
|
||||||
print('passengerPhotoUrl = ${box.read(BoxName.passengerPhotoUrl)}');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method to handle sign-out process
|
// Method to handle sign-out process
|
||||||
@@ -111,7 +101,5 @@ class GoogleSignInHelper {
|
|||||||
Get.offAll(OnBoardingPage());
|
Get.offAll(OnBoardingPage());
|
||||||
// Perform any additional sign-out tasks or API calls here
|
// Perform any additional sign-out tasks or API calls here
|
||||||
// For example, you can notify your server about the user sign-out
|
// For example, you can notify your server about the user sign-out
|
||||||
|
|
||||||
print('User data cleared.');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,10 +29,7 @@ class TokenController extends GetxController {
|
|||||||
|
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
print(res.request);
|
|
||||||
print(res.body);
|
|
||||||
var jsonToken = jsonDecode(res.body);
|
var jsonToken = jsonDecode(res.body);
|
||||||
// print(jsonToken);
|
|
||||||
if (jsonToken['status'] == 'The token has been updated successfully.') {
|
if (jsonToken['status'] == 'The token has been updated successfully.') {
|
||||||
Get.snackbar('token updated'.tr, '');
|
Get.snackbar('token updated'.tr, '');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class AudioRecorderController extends GetxController {
|
|||||||
final bool isPermissionGranted = await recorder.hasPermission();
|
final bool isPermissionGranted = await recorder.hasPermission();
|
||||||
if (!isPermissionGranted) {
|
if (!isPermissionGranted) {
|
||||||
// RecordingPermissionException('l');
|
// RecordingPermissionException('l');
|
||||||
print('sss');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +50,6 @@ class AudioRecorderController extends GetxController {
|
|||||||
|
|
||||||
Future<void> stopRecording() async {
|
Future<void> stopRecording() async {
|
||||||
final path = await recorder.stop();
|
final path = await recorder.stop();
|
||||||
print(path);
|
|
||||||
isRecording = false;
|
isRecording = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@@ -94,11 +92,8 @@ class AudioRecorderController extends GetxController {
|
|||||||
final file = File(filePath);
|
final file = File(filePath);
|
||||||
if (await file.exists()) {
|
if (await file.exists()) {
|
||||||
await file.delete();
|
await file.delete();
|
||||||
print('File deleted: $filePath');
|
|
||||||
await getRecordedFiles();
|
await getRecordedFiles();
|
||||||
} else {
|
} else {}
|
||||||
print('File not found: $filePath');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deleteAllRecordedFiles() async {
|
Future<void> deleteAllRecordedFiles() async {
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ class CallController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initAgoraFull() async {
|
initAgoraFull() async {
|
||||||
print('channelName is $channelName');
|
|
||||||
print('remoteid is $remoteUid');
|
|
||||||
print('uid is $uid');
|
|
||||||
await fetchToken();
|
await fetchToken();
|
||||||
// Set up an instance of Agora engine
|
// Set up an instance of Agora engine
|
||||||
setupVoiceSDKEngine();
|
setupVoiceSDKEngine();
|
||||||
@@ -70,8 +67,6 @@ class CallController extends GetxController {
|
|||||||
//create an instance of the Agora engine
|
//create an instance of the Agora engine
|
||||||
agoraEngine = createAgoraRtcEngine();
|
agoraEngine = createAgoraRtcEngine();
|
||||||
await agoraEngine.initialize(RtcEngineContext(appId: AK.agoraAppId));
|
await agoraEngine.initialize(RtcEngineContext(appId: AK.agoraAppId));
|
||||||
print('eeeeeeeeeeeeeeeeeeee');
|
|
||||||
print(agoraEngine);
|
|
||||||
// Register the event handler
|
// Register the event handler
|
||||||
agoraEngine.registerEventHandler(
|
agoraEngine.registerEventHandler(
|
||||||
RtcEngineEventHandler(
|
RtcEngineEventHandler(
|
||||||
@@ -133,7 +128,6 @@ class CallController extends GetxController {
|
|||||||
var res = await CRUD()
|
var res = await CRUD()
|
||||||
.getAgoraToken(channelName: channelName, uid: uid.toString());
|
.getAgoraToken(channelName: channelName, uid: uid.toString());
|
||||||
token = res;
|
token = res;
|
||||||
print('token is $token');
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,15 +27,9 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print("-----request----" + response.request.toString());
|
|
||||||
// print("-----headers-----" + response.headers.toString());
|
|
||||||
print("-----payload-----" + payload.toString());
|
|
||||||
// if (response.statusCode == 200) {
|
// if (response.statusCode == 200) {
|
||||||
// print(response.body);
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
// print(jsonData);
|
|
||||||
|
|
||||||
return response.body;
|
return response.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,14 +53,9 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print("-----request----" + response.request.toString());
|
|
||||||
// print("-----headers-----" + response.headers.toString());
|
|
||||||
print("-----payload-----" + payload.toString());
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print(response.body);
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
// if (jsonData['status'] == 'success') {
|
// if (jsonData['status'] == 'success') {
|
||||||
// print(jsonData);
|
|
||||||
|
|
||||||
return jsonData;
|
return jsonData;
|
||||||
// }
|
// }
|
||||||
@@ -87,11 +76,8 @@ class CRUD {
|
|||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
var response = jsonDecode(res.body);
|
var response = jsonDecode(res.body);
|
||||||
print(await response);
|
|
||||||
return response['token'];
|
return response['token'];
|
||||||
} else {
|
} else {}
|
||||||
print(res.reasonPhrase);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> getLlama({
|
Future<dynamic> getLlama({
|
||||||
@@ -153,7 +139,6 @@ class CRUD {
|
|||||||
String imagePathFull =
|
String imagePathFull =
|
||||||
'${AppLink.server}card_image/$imagePath-${box.read(BoxName.driverID) ?? box.read(BoxName.passengerID)}.jpg';
|
'${AppLink.server}card_image/$imagePath-${box.read(BoxName.driverID) ?? box.read(BoxName.passengerID)}.jpg';
|
||||||
|
|
||||||
print('imagePath=$imagePathFull');
|
|
||||||
var requestBody = {"url": imagePathFull};
|
var requestBody = {"url": imagePathFull};
|
||||||
var response = await http.post(
|
var response = await http.post(
|
||||||
url,
|
url,
|
||||||
@@ -163,8 +148,6 @@ class CRUD {
|
|||||||
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var responseBody = jsonDecode(response.body);
|
var responseBody = jsonDecode(response.body);
|
||||||
// print(decode);
|
|
||||||
print('imagePath=$imagePathFull');
|
|
||||||
return responseBody.toString();
|
return responseBody.toString();
|
||||||
}
|
}
|
||||||
return response.statusCode;
|
return response.statusCode;
|
||||||
@@ -221,12 +204,8 @@ class CRUD {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print(response);
|
|
||||||
return response.body;
|
return response.body;
|
||||||
} else {
|
} else {}
|
||||||
print('eeeeeeeeerrrrorrrr ${response.statusCode}');
|
|
||||||
print(response.body);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> post({
|
Future<dynamic> post({
|
||||||
@@ -247,11 +226,8 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.request);
|
|
||||||
print(payload);
|
|
||||||
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
print(jsonData);
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
return response.body;
|
return response.body;
|
||||||
@@ -274,11 +250,8 @@ class CRUD {
|
|||||||
);
|
);
|
||||||
var response = await http.post(url,
|
var response = await http.post(url,
|
||||||
body: payload, headers: {'Content-Type': 'application/json'});
|
body: payload, headers: {'Content-Type': 'application/json'});
|
||||||
print(response.request);
|
|
||||||
print(payload);
|
|
||||||
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
// print(jsonData);
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
return response.body;
|
return response.body;
|
||||||
@@ -304,13 +277,8 @@ class CRUD {
|
|||||||
request.headers.addAll(headers);
|
request.headers.addAll(headers);
|
||||||
|
|
||||||
http.StreamedResponse response = await request.send();
|
http.StreamedResponse response = await request.send();
|
||||||
// print(request.body);
|
|
||||||
// print(response);
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print(await response.stream.bytesToString());
|
} else {}
|
||||||
} else {
|
|
||||||
print(response.reasonPhrase);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> postFromDialogue({
|
Future<dynamic> postFromDialogue({
|
||||||
@@ -331,9 +299,6 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//print(response.request);
|
|
||||||
//print('body=========================');
|
|
||||||
//print(response.body);
|
|
||||||
|
|
||||||
if (response.body.isNotEmpty) {
|
if (response.body.isNotEmpty) {
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
@@ -375,10 +340,7 @@ class CRUD {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (response.statusCode == 201) {
|
if (response.statusCode == 201) {
|
||||||
print('Verification request sent');
|
} else {}
|
||||||
} else {
|
|
||||||
print('Failed to send verification request');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prompt the user to enter the OTP
|
// Prompt the user to enter the OTP
|
||||||
final otpCode = "123456"; // Replace with user input
|
final otpCode = "123456"; // Replace with user input
|
||||||
@@ -401,10 +363,7 @@ class CRUD {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (checkResponse.statusCode == 201) {
|
if (checkResponse.statusCode == 201) {
|
||||||
print('Verification successful');
|
} else {}
|
||||||
} else {
|
|
||||||
print('Verification failed');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> getGoogleApi({
|
Future<dynamic> getGoogleApi({
|
||||||
@@ -418,9 +377,7 @@ class CRUD {
|
|||||||
url,
|
url,
|
||||||
body: payload,
|
body: payload,
|
||||||
);
|
);
|
||||||
print(response.request);
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
// //print(jsonData);
|
|
||||||
if (jsonData['status'] == 'OK') {
|
if (jsonData['status'] == 'OK') {
|
||||||
return jsonData;
|
return jsonData;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,6 @@
|
|||||||
// deviceDataList.add(deviceData);
|
// deviceDataList.add(deviceData);
|
||||||
// }
|
// }
|
||||||
// } catch (e) {
|
// } catch (e) {
|
||||||
// print('Failed to get device info: $e');
|
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// return deviceDataList;
|
// return deviceDataList;
|
||||||
@@ -85,20 +84,7 @@
|
|||||||
// // Method to print all device data
|
// // Method to print all device data
|
||||||
// static void printDeviceInfo() {
|
// static void printDeviceInfo() {
|
||||||
// for (Map<String, dynamic> deviceData in deviceDataList) {
|
// 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'}');
|
// '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('--------------------');
|
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import 'dart:io';
|
|||||||
void showInBrowser(String url) async {
|
void showInBrowser(String url) async {
|
||||||
if (await canLaunchUrl(Uri.parse(url))) {
|
if (await canLaunchUrl(Uri.parse(url))) {
|
||||||
launchUrl(Uri.parse(url));
|
launchUrl(Uri.parse(url));
|
||||||
} else {
|
} else {}
|
||||||
print('Could not launch $url');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void launchCommunication(
|
void launchCommunication(
|
||||||
@@ -30,7 +28,6 @@ void launchCommunication(
|
|||||||
'mailto:$contactInfo?subject=Subject&body=${Uri.encodeComponent(message)}';
|
'mailto:$contactInfo?subject=Subject&body=${Uri.encodeComponent(message)}';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
print('Method not supported on iOS');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (Platform.isAndroid) {
|
} else if (Platform.isAndroid) {
|
||||||
@@ -49,7 +46,6 @@ void launchCommunication(
|
|||||||
url =
|
url =
|
||||||
'whatsapp://send?phone=$contactInfo&text=${Uri.encodeComponent(message)}';
|
'whatsapp://send?phone=$contactInfo&text=${Uri.encodeComponent(message)}';
|
||||||
} else {
|
} else {
|
||||||
print('WhatsApp is not installed on this device.');
|
|
||||||
// Provide an alternative action, such as opening the WhatsApp Web API
|
// Provide an alternative action, such as opening the WhatsApp Web API
|
||||||
url =
|
url =
|
||||||
'https://api.whatsapp.com/send?phone=$contactInfo&text=${Uri.encodeComponent(message)}';
|
'https://api.whatsapp.com/send?phone=$contactInfo&text=${Uri.encodeComponent(message)}';
|
||||||
@@ -60,19 +56,13 @@ void launchCommunication(
|
|||||||
'mailto:$contactInfo?subject=Subject&body=${Uri.encodeComponent(message)}';
|
'mailto:$contactInfo?subject=Subject&body=${Uri.encodeComponent(message)}';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
print('Method not supported on Android');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print('Platform not supported');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
print('Launching URL: $url');
|
|
||||||
|
|
||||||
if (await canLaunchUrl(Uri.parse(url))) {
|
if (await canLaunchUrl(Uri.parse(url))) {
|
||||||
await launchUrl(Uri.parse(url));
|
await launchUrl(Uri.parse(url));
|
||||||
} else {
|
} else {}
|
||||||
print('Could not launch $url');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
// BackgroundLocation.startLocationService();
|
// BackgroundLocation.startLocationService();
|
||||||
// BackgroundLocation.getLocationUpdates((location) {
|
// BackgroundLocation.getLocationUpdates((location) {
|
||||||
// // Handle location updates here
|
// // Handle location updates here
|
||||||
// print("New location: ${location.latitude}, ${location.longitude}");
|
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
// Duration.microsecondsPerSecond); // Set interval to 5 seconds
|
// Duration.microsecondsPerSecond); // Set interval to 5 seconds
|
||||||
|
|
||||||
// BackgroundLocation.getLocationUpdates((location1) {
|
// BackgroundLocation.getLocationUpdates((location1) {
|
||||||
// print('''\n
|
|
||||||
// Latitude: ${location1.latitude.toString()}
|
// Latitude: ${location1.latitude.toString()}
|
||||||
// Longitude: ${location1.longitude.toString()}
|
// Longitude: ${location1.longitude.toString()}
|
||||||
// Altitude: ${location1.altitude.toString()}
|
// Altitude: ${location1.altitude.toString()}
|
||||||
@@ -61,7 +59,6 @@
|
|||||||
// });
|
// });
|
||||||
// } else {
|
// } else {
|
||||||
// await Permission.locationAlways.request();
|
// await Permission.locationAlways.request();
|
||||||
// print('Location permission not granted');
|
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ class LocationController extends GetxController {
|
|||||||
|
|
||||||
// if (isActive) {
|
// if (isActive) {
|
||||||
if (double.parse(totalPoints) > -300) {
|
if (double.parse(totalPoints) > -300) {
|
||||||
print('total point is $totalPoints');
|
|
||||||
|
|
||||||
await getLocation();
|
await getLocation();
|
||||||
|
|
||||||
// if (box.read(BoxName.driverID) != null) {
|
// if (box.read(BoxName.driverID) != null) {
|
||||||
@@ -73,7 +71,6 @@ class LocationController extends GetxController {
|
|||||||
// }
|
// }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Handle the error gracefully
|
// Handle the error gracefully
|
||||||
print('Error during location updates: $e');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -125,21 +122,12 @@ class LocationController extends GetxController {
|
|||||||
// if (previousTime > 0) {
|
// if (previousTime > 0) {
|
||||||
// double distance = calculateDistanceInKmPerHour(
|
// double distance = calculateDistanceInKmPerHour(
|
||||||
// previousTime, _locationData.time, speed);
|
// previousTime, _locationData.time, speed);
|
||||||
// print('distance $distance');
|
|
||||||
// totalDistance += distance;
|
// totalDistance += distance;
|
||||||
// }
|
// }
|
||||||
// // print('totalDistance: $totalDistance');
|
|
||||||
|
|
||||||
// previousTime = _locationData.time!;
|
// previousTime = _locationData.time!;
|
||||||
// }
|
// }
|
||||||
// Print location details
|
// Print location details
|
||||||
// print('myLocation: ${myLocation}');
|
|
||||||
// print('Accuracy: ${_locationData.accuracy}');
|
|
||||||
// print('Latitude: ${_locationData.latitude}');
|
|
||||||
// print('Longitude: ${_locationData.longitude}');
|
|
||||||
// print('Time: ${_locationData.time}');
|
|
||||||
print('speed: ${_locationData.speed}');
|
|
||||||
// print('Heading: ${_locationData.heading}');
|
|
||||||
// isLoading = false;
|
// isLoading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,10 +28,6 @@ class SmsEgyptController extends GetxController {
|
|||||||
headers: headers,
|
headers: headers,
|
||||||
);
|
);
|
||||||
|
|
||||||
print(res.reasonPhrase);
|
|
||||||
print(res.request);
|
|
||||||
print(res.body);
|
|
||||||
print(body);
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'You will recieve code in sms message'.tr,
|
title: 'You will recieve code in sms message'.tr,
|
||||||
@@ -53,7 +49,6 @@ class SmsEgyptController extends GetxController {
|
|||||||
},
|
},
|
||||||
headers: headers,
|
headers: headers,
|
||||||
);
|
);
|
||||||
print(res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future sendSmsWithValidaty(String phone, otp) async {
|
Future sendSmsWithValidaty(String phone, otp) async {
|
||||||
@@ -71,7 +66,6 @@ class SmsEgyptController extends GetxController {
|
|||||||
},
|
},
|
||||||
headers: headers,
|
headers: headers,
|
||||||
);
|
);
|
||||||
print(res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future sendSmsStatus(String smsid) async {
|
Future sendSmsStatus(String smsid) async {
|
||||||
@@ -84,6 +78,5 @@ class SmsEgyptController extends GetxController {
|
|||||||
},
|
},
|
||||||
headers: headers,
|
headers: headers,
|
||||||
);
|
);
|
||||||
print(res);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ class TextToSpeechController extends GetxController {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Handle error gracefully, e.g., show a message
|
// Handle error gracefully, e.g., show a message
|
||||||
Get.snackbar('Error', 'Failed to speak text: $error');
|
Get.snackbar('Error', 'Failed to speak text: $error');
|
||||||
print('Failed to speak text: $error');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
// messageBody: message,
|
// messageBody: message,
|
||||||
// );
|
// );
|
||||||
// } catch (e) {
|
// } catch (e) {
|
||||||
// print(e); // Print the exception to the console.
|
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ class ImageController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
// Save the cropped image
|
// Save the cropped image
|
||||||
File savedCroppedImage = File(croppedFile!.path);
|
File savedCroppedImage = File(croppedFile!.path);
|
||||||
print('link =$link');
|
|
||||||
try {
|
try {
|
||||||
await uploadImage(
|
await uploadImage(
|
||||||
savedCroppedImage,
|
savedCroppedImage,
|
||||||
@@ -61,7 +60,6 @@ class ImageController extends GetxController {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
Get.snackbar('Image Upload Failed'.tr, e.toString(),
|
Get.snackbar('Image Upload Failed'.tr, e.toString(),
|
||||||
backgroundColor: AppColor.redColor);
|
backgroundColor: AppColor.redColor);
|
||||||
print(e);
|
|
||||||
} finally {
|
} finally {
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ class MyMenuController extends GetxController {
|
|||||||
} else {
|
} else {
|
||||||
isDrawerOpen = true;
|
isDrawerOpen = true;
|
||||||
}
|
}
|
||||||
print(isDrawerOpen);
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ class CaptainWalletController extends GetxController {
|
|||||||
// totalAmount = walletDate['message'][0]['total_amount'].toString() == null
|
// totalAmount = walletDate['message'][0]['total_amount'].toString() == null
|
||||||
// ? '0'
|
// ? '0'
|
||||||
// : walletDate['message'][0]['total_amount'];
|
// : walletDate['message'][0]['total_amount'];
|
||||||
// print(totalAmount);
|
|
||||||
|
|
||||||
// var res1 = await CRUD().get(
|
// var res1 = await CRUD().get(
|
||||||
// link: AppLink.getAllPaymentVisa,
|
// link: AppLink.getAllPaymentVisa,
|
||||||
@@ -56,7 +55,6 @@ class CaptainWalletController extends GetxController {
|
|||||||
// totalAmountVisa = walletDateVisa['message'][0]['diff'].toString() == null
|
// totalAmountVisa = walletDateVisa['message'][0]['diff'].toString() == null
|
||||||
// ? '0'
|
// ? '0'
|
||||||
// : walletDateVisa['message'][0]['diff'];
|
// : walletDateVisa['message'][0]['diff'];
|
||||||
// print(totalAmountVisa);
|
|
||||||
// isLoading = false;
|
// isLoading = false;
|
||||||
// update();
|
// update();
|
||||||
// }
|
// }
|
||||||
@@ -91,7 +89,6 @@ class CaptainWalletController extends GetxController {
|
|||||||
});
|
});
|
||||||
var d = jsonDecode(res);
|
var d = jsonDecode(res);
|
||||||
paymentID = d['message'].toString();
|
paymentID = d['message'].toString();
|
||||||
print('paymentID $paymentID');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future addDriverWallet(String paymentMethod, point) async {
|
Future addDriverWallet(String paymentMethod, point) async {
|
||||||
|
|||||||
@@ -44,11 +44,6 @@ class CreditCardController extends GetxController {
|
|||||||
// String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
// String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
||||||
// String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
// String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
||||||
|
|
||||||
// print('cardNumber: $cardNumber');
|
|
||||||
// print('cardHolderName: $cardHolderName');
|
|
||||||
// print('expiryDate: $expiryDate');
|
|
||||||
// print('cvvCode: $cvvCode');
|
|
||||||
|
|
||||||
// if (cvvCode != null && cvvCode.isNotEmpty) {
|
// if (cvvCode != null && cvvCode.isNotEmpty) {
|
||||||
// final maskedCardNumber = DigitObscuringFormatter()
|
// final maskedCardNumber = DigitObscuringFormatter()
|
||||||
// .formatEditUpdate(
|
// .formatEditUpdate(
|
||||||
@@ -57,8 +52,6 @@ class CreditCardController extends GetxController {
|
|||||||
// )
|
// )
|
||||||
// .text;
|
// .text;
|
||||||
|
|
||||||
// print('maskedCardNumber: $maskedCardNumber');
|
|
||||||
|
|
||||||
// cardNumberController.text = maskedCardNumber;
|
// cardNumberController.text = maskedCardNumber;
|
||||||
// cardHolderNameController.text = cardHolderName ?? '';
|
// cardHolderNameController.text = cardHolderName ?? '';
|
||||||
// expiryDateController.text = expiryDate ?? '';
|
// expiryDateController.text = expiryDate ?? '';
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ class PointsForRiderController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void removeLocation(int index) {
|
void removeLocation(int index) {
|
||||||
print(index);
|
|
||||||
locations.removeAt(index);
|
locations.removeAt(index);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
@@ -96,25 +95,18 @@ class WayPointController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updatePlace(int index, String input) async {
|
void updatePlace(int index, String input) async {
|
||||||
print(myLocation);
|
|
||||||
print(index);
|
|
||||||
print(input);
|
|
||||||
var url =
|
var url =
|
||||||
'${AppLink.googleMapsLink}place/nearbysearch/json?keyword=$input&location=${myLocation.latitude},${myLocation.longitude}&radius=50000&language=en&key=${AK.mapAPIKEY.toString()}';
|
'${AppLink.googleMapsLink}place/nearbysearch/json?keyword=$input&location=${myLocation.latitude},${myLocation.longitude}&radius=50000&language=en&key=${AK.mapAPIKEY.toString()}';
|
||||||
print(url);
|
|
||||||
var response = await CRUD().getGoogleApi(link: url, payload: {});
|
var response = await CRUD().getGoogleApi(link: url, payload: {});
|
||||||
// final place = input;
|
// final place = input;
|
||||||
// print(response);
|
|
||||||
// if (index == 0) {
|
// if (index == 0) {
|
||||||
List<dynamic> newList = [];
|
List<dynamic> newList = [];
|
||||||
placeListResponse.add(newList);
|
placeListResponse.add(newList);
|
||||||
newList = response['results'];
|
newList = response['results'];
|
||||||
print(newList);
|
|
||||||
placeListResponse[index].add(newList);
|
placeListResponse[index].add(newList);
|
||||||
update();
|
update();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
print(placeListResponse[index]);
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class ComplaintController extends GetxController {
|
|||||||
'feedBack': complaintController.text
|
'feedBack': complaintController.text
|
||||||
});
|
});
|
||||||
var d = jsonDecode(res);
|
var d = jsonDecode(res);
|
||||||
// print(d);
|
|
||||||
if (d['status'].toString() == 'success') {
|
if (d['status'].toString() == 'success') {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Success'.tr,
|
title: 'Success'.tr,
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class OrderHistoryController extends GetxController {
|
|||||||
var jsonDecoded = jsonDecode(res);
|
var jsonDecoded = jsonDecode(res);
|
||||||
|
|
||||||
orderHistoryListPassenger = jsonDecoded['data'];
|
orderHistoryListPassenger = jsonDecoded['data'];
|
||||||
// print(orderHistoryListPassenger);
|
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ class PromosController extends GetxController {
|
|||||||
promoList = jsonDecoded['message'];
|
promoList = jsonDecoded['message'];
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
print(promoList);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ class SplashScreenController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void startTimer() async {
|
void startTimer() async {
|
||||||
print(box.read(BoxName.email));
|
|
||||||
print(box.read(BoxName.phone));
|
|
||||||
print(box.read(BoxName.isVerified));
|
|
||||||
print('---------');
|
|
||||||
Timer(const Duration(seconds: 5), () async {
|
Timer(const Duration(seconds: 5), () async {
|
||||||
box.read(BoxName.onBoarding) == null
|
box.read(BoxName.onBoarding) == null
|
||||||
? Get.off(() => OnBoardingPage())
|
? Get.off(() => OnBoardingPage())
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class NotificationCaptainController extends GetxController {
|
|||||||
link: AppLink.getNotificationCaptain,
|
link: AppLink.getNotificationCaptain,
|
||||||
payload: {'driverID': box.read(BoxName.driverID)});
|
payload: {'driverID': box.read(BoxName.driverID)});
|
||||||
if (res == "failure") {
|
if (res == "failure") {
|
||||||
// print(res);
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'There is no notification yet'.tr,
|
title: 'There is no notification yet'.tr,
|
||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
@@ -35,7 +34,6 @@ class NotificationCaptainController extends GetxController {
|
|||||||
notificationData = jsonDecode(res);
|
notificationData = jsonDecode(res);
|
||||||
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
||||||
|
|
||||||
// print(notificationData);
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class PassengerNotificationController extends GetxController {
|
|||||||
link: AppLink.getNotificationPassenger,
|
link: AppLink.getNotificationPassenger,
|
||||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||||
if (res == "failure") {
|
if (res == "failure") {
|
||||||
// print(res);
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'There is no notification yet'.tr,
|
title: 'There is no notification yet'.tr,
|
||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
@@ -36,7 +35,6 @@ class PassengerNotificationController extends GetxController {
|
|||||||
notificationData = jsonDecode(res);
|
notificationData = jsonDecode(res);
|
||||||
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
||||||
|
|
||||||
// print(notificationData);
|
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class RideAvailableController extends GetxController {
|
|||||||
var res = await CRUD().get(link: AppLink.getRideWaiting, payload: {});
|
var res = await CRUD().get(link: AppLink.getRideWaiting, payload: {});
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
rideAvailableMap = jsonDecode(res);
|
rideAvailableMap = jsonDecode(res);
|
||||||
print(rideAvailableMap);
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ class DriverWalletHistoryController extends GetxController {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
archive = jsonDecode(res)['message'];
|
archive = jsonDecode(res)['message'];
|
||||||
print(archive);
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ class PassengerWalletHistoryController extends GetxController {
|
|||||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
archive = jsonDecode(res)['message'];
|
archive = jsonDecode(res)['message'];
|
||||||
print(archive);
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ class PaymentController extends GetxController {
|
|||||||
'amount': amount.toString(),
|
'amount': amount.toString(),
|
||||||
});
|
});
|
||||||
var d = jsonDecode(res);
|
var d = jsonDecode(res);
|
||||||
print('paymentToken ${d['message']}');
|
|
||||||
return d['message'];
|
return d['message'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +78,6 @@ class PaymentController extends GetxController {
|
|||||||
'amount': amount.toString(),
|
'amount': amount.toString(),
|
||||||
});
|
});
|
||||||
var d = jsonDecode(res);
|
var d = jsonDecode(res);
|
||||||
// print('paymentToken ${d['message']}');
|
|
||||||
return d['message'];
|
return d['message'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,13 +158,11 @@ class PaymentController extends GetxController {
|
|||||||
var decod = jsonDecode(value);
|
var decod = jsonDecode(value);
|
||||||
|
|
||||||
if (decod["status"] == "success") {
|
if (decod["status"] == "success") {
|
||||||
print(totalPassenger);
|
|
||||||
var firstElement = decod["message"][0];
|
var firstElement = decod["message"][0];
|
||||||
totalPassenger = totalPassenger -
|
totalPassenger = totalPassenger -
|
||||||
(totalPassenger * int.parse(firstElement['amount']));
|
(totalPassenger * int.parse(firstElement['amount']));
|
||||||
MapPassengerController().promoTaken = true;
|
MapPassengerController().promoTaken = true;
|
||||||
update();
|
update();
|
||||||
print(totalPassenger);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -193,7 +189,6 @@ class PaymentController extends GetxController {
|
|||||||
method();
|
method();
|
||||||
} else {
|
} else {
|
||||||
// Authentication failed, handle accordingly
|
// Authentication failed, handle accordingly
|
||||||
print('Authentication failed');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Local authentication not available, proceed with payment without authentication
|
// Local authentication not available, proceed with payment without authentication
|
||||||
@@ -264,7 +259,6 @@ class PaymentController extends GetxController {
|
|||||||
|
|
||||||
// Convert the res object to a JSON object
|
// Convert the res object to a JSON object
|
||||||
final jsonResponse = jsonDecode(res);
|
final jsonResponse = jsonDecode(res);
|
||||||
print(jsonResponse);
|
|
||||||
// Check if the client_secret property exists and is not null
|
// Check if the client_secret property exists and is not null
|
||||||
if (jsonResponse.containsKey('client_secret') &&
|
if (jsonResponse.containsKey('client_secret') &&
|
||||||
jsonResponse['client_secret'] != null) {
|
jsonResponse['client_secret'] != null) {
|
||||||
@@ -292,7 +286,6 @@ class PaymentController extends GetxController {
|
|||||||
// User authenticated successfully, proceed with payment
|
// User authenticated successfully, proceed with payment
|
||||||
|
|
||||||
if (selectedAmount != 0) {
|
if (selectedAmount != 0) {
|
||||||
print(selectedAmount);
|
|
||||||
changePromoSheetDialogue();
|
changePromoSheetDialogue();
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@@ -347,17 +340,14 @@ class PaymentController extends GetxController {
|
|||||||
],
|
],
|
||||||
note: "Contact us for any questions on your order.".tr,
|
note: "Contact us for any questions on your order.".tr,
|
||||||
onSuccess: (Map params) async {
|
onSuccess: (Map params) async {
|
||||||
print("onSuccess: $params");
|
|
||||||
addPassengerWallet();
|
addPassengerWallet();
|
||||||
changePromoSheetDialogue();
|
changePromoSheetDialogue();
|
||||||
await getPassengerWallet();
|
await getPassengerWallet();
|
||||||
},
|
},
|
||||||
onError: (error) {
|
onError: (error) {
|
||||||
print("onError: $error");
|
|
||||||
Toast.show(context, ' $error'.tr, AppColor.redColor);
|
Toast.show(context, ' $error'.tr, AppColor.redColor);
|
||||||
},
|
},
|
||||||
onCancel: (params) {
|
onCancel: (params) {
|
||||||
print('cancelled: $params');
|
|
||||||
Toast.show(context, 'Pyament Cancelled .'.tr,
|
Toast.show(context, 'Pyament Cancelled .'.tr,
|
||||||
AppColor.yellowColor);
|
AppColor.yellowColor);
|
||||||
}),
|
}),
|
||||||
@@ -369,7 +359,6 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Authentication failed, handle accordingly
|
// Authentication failed, handle accordingly
|
||||||
print('Authentication failed');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -383,7 +372,6 @@ class PaymentController extends GetxController {
|
|||||||
link: AppLink.getLicense,
|
link: AppLink.getLicense,
|
||||||
payload: {'driverID': box.read(BoxName.driverID)});
|
payload: {'driverID': box.read(BoxName.driverID)});
|
||||||
licenseDetailsMap = jsonDecode(res);
|
licenseDetailsMap = jsonDecode(res);
|
||||||
// print(licenseDetailsMap['message'][0]['name']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future createConnectAccount() async {
|
Future createConnectAccount() async {
|
||||||
@@ -393,7 +381,6 @@ class PaymentController extends GetxController {
|
|||||||
DateTime.parse(licenseDetailsMap['message'][0]['dateOfBirth']);
|
DateTime.parse(licenseDetailsMap['message'][0]['dateOfBirth']);
|
||||||
int currentTimestamp =
|
int currentTimestamp =
|
||||||
(DateTime.now().millisecondsSinceEpoch / 1000).round();
|
(DateTime.now().millisecondsSinceEpoch / 1000).round();
|
||||||
print('Current Unix timestamp: $currentTimestamp');
|
|
||||||
int day = dob.day;
|
int day = dob.day;
|
||||||
int month = dob.month;
|
int month = dob.month;
|
||||||
int year = dob.year;
|
int year = dob.year;
|
||||||
@@ -454,11 +441,9 @@ class PaymentController extends GetxController {
|
|||||||
payload: body,
|
payload: body,
|
||||||
);
|
);
|
||||||
final responseData = jsonDecode(response);
|
final responseData = jsonDecode(response);
|
||||||
// print(responseData);
|
|
||||||
final accountId = responseData['id'];
|
final accountId = responseData['id'];
|
||||||
box.write(BoxName.accountIdStripeConnect, accountId);
|
box.write(BoxName.accountIdStripeConnect, accountId);
|
||||||
await updateCaptainAccountBank();
|
await updateCaptainAccountBank();
|
||||||
print('accountId = $accountId');
|
|
||||||
return accountId;
|
return accountId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,10 +472,8 @@ class PaymentController extends GetxController {
|
|||||||
payload: body,
|
payload: body,
|
||||||
);
|
);
|
||||||
final responseData = jsonDecode(response);
|
final responseData = jsonDecode(response);
|
||||||
print(responseData);
|
|
||||||
final transactionId = responseData['id'];
|
final transactionId = responseData['id'];
|
||||||
|
|
||||||
print('transactionId = $transactionId');
|
|
||||||
return transactionId;
|
return transactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,10 +484,7 @@ class PaymentController extends GetxController {
|
|||||||
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
ip = jsonDecode(response.body)['ip'];
|
ip = jsonDecode(response.body)['ip'];
|
||||||
print(ip);
|
} else {}
|
||||||
} else {
|
|
||||||
print('Request failed with status: ${response.statusCode}');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'https://accept.paymob.com/unifiedcheckout/?publicKey=egy_pk_live_mbjDC9Ni6FSHKmsz8sOHiVk2xd7oWRve&clientSecret=egy_sk_live_c0904e9cf04506ae64f818d4e075b4a957e3713fdf7a22cb7da30a29e72442b5'
|
// 'https://accept.paymob.com/unifiedcheckout/?publicKey=egy_pk_live_mbjDC9Ni6FSHKmsz8sOHiVk2xd7oWRve&clientSecret=egy_sk_live_c0904e9cf04506ae64f818d4e075b4a957e3713fdf7a22cb7da30a29e72442b5'
|
||||||
@@ -526,16 +506,7 @@ class PaymentController extends GetxController {
|
|||||||
amountInCents: newAmount, // 19.00 EGP
|
amountInCents: newAmount, // 19.00 EGP
|
||||||
|
|
||||||
billingData: PaymobBillingData(),
|
billingData: PaymobBillingData(),
|
||||||
onPayment: (PaymobResponse response) {
|
onPayment: (PaymobResponse response) {},
|
||||||
print('Success: ${response.success}');
|
|
||||||
print('Transaction ID: ${response.transactionID}');
|
|
||||||
print('Response Code: ${response.responseCode}');
|
|
||||||
// print('Message: ${response.message}');
|
|
||||||
print(box.read(BoxName.passengerWalletTotal));
|
|
||||||
print(box.read(BoxName.name));
|
|
||||||
print(box.read(BoxName.phone));
|
|
||||||
// print();
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response!.responseCode == 'APPROVED') {
|
if (response!.responseCode == 'APPROVED') {
|
||||||
@@ -577,7 +548,6 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Authentication failed, handle accordingly
|
// Authentication failed, handle accordingly
|
||||||
print('Authentication failed');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final PaymobResponse? response = await PaymobPayment.instance.pay(
|
final PaymobResponse? response = await PaymobPayment.instance.pay(
|
||||||
@@ -585,12 +555,7 @@ class PaymentController extends GetxController {
|
|||||||
currency: currency, //"EGP",
|
currency: currency, //"EGP",
|
||||||
amountInCents: newAmount, // 19.00 EGP
|
amountInCents: newAmount, // 19.00 EGP
|
||||||
billingData: PaymobBillingData(),
|
billingData: PaymobBillingData(),
|
||||||
onPayment: (PaymobResponse response) {
|
onPayment: (PaymobResponse response) {},
|
||||||
// print('Success: ${response.success}');
|
|
||||||
// print('Transaction ID: ${response.transactionID}');
|
|
||||||
// print('Response Code: ${response.responseCode}');
|
|
||||||
// print('Message: ${response.message}');
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response!.responseCode == 'APPROVED') {
|
if (response!.responseCode == 'APPROVED') {
|
||||||
@@ -679,17 +644,7 @@ class PaymentController extends GetxController {
|
|||||||
amountInCents: newAmount, // 19.00 EGP
|
amountInCents: newAmount, // 19.00 EGP
|
||||||
|
|
||||||
billingData: PaymobBillingDataWallet(),
|
billingData: PaymobBillingDataWallet(),
|
||||||
onPayment: (PaymobResponseWallet response) {
|
onPayment: (PaymobResponseWallet response) {},
|
||||||
// print('Success: ${response.success}');
|
|
||||||
// print('Transaction ID: ${response.transactionID}');
|
|
||||||
// print('Response Code: ${response.responseCode}');
|
|
||||||
// print('Message: ${response.message}');
|
|
||||||
|
|
||||||
// print(box.read(BoxName.passengerWalletTotal));//
|
|
||||||
// print(box.read(BoxName.name));
|
|
||||||
// print(box.read(BoxName.phone));
|
|
||||||
// print();
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response!.success == true && response.responseCode == '200') {
|
if (response!.success == true && response.responseCode == '200') {
|
||||||
@@ -748,7 +703,6 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Authentication failed, handle accordingly
|
// Authentication failed, handle accordingly
|
||||||
print('Authentication failed');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final PaymobResponse? response = await PaymobPayment.instance.pay(
|
final PaymobResponse? response = await PaymobPayment.instance.pay(
|
||||||
@@ -756,12 +710,7 @@ class PaymentController extends GetxController {
|
|||||||
currency: currency, //"EGP",
|
currency: currency, //"EGP",
|
||||||
amountInCents: newAmount, // 19.00 EGP
|
amountInCents: newAmount, // 19.00 EGP
|
||||||
billingData: PaymobBillingData(),
|
billingData: PaymobBillingData(),
|
||||||
onPayment: (PaymobResponse response) {
|
onPayment: (PaymobResponse response) {},
|
||||||
// print('Success: ${response.success}');
|
|
||||||
// print('Transaction ID: ${response.transactionID}');
|
|
||||||
// print('Response Code: ${response.responseCode}');
|
|
||||||
// print('Message: ${response.message}');
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response!.responseCode == 'APPROVED') {
|
if (response!.responseCode == 'APPROVED') {
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ class PaymobManager extends GetxController {
|
|||||||
update();
|
update();
|
||||||
return paymentKey;
|
return paymentKey;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("Exc==========================================");
|
|
||||||
print(e.toString());
|
|
||||||
throw Exception();
|
throw Exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,7 +44,6 @@ class PaymobManager extends GetxController {
|
|||||||
paymentToken = await PaymobManager().getPaymentKey(amount, currency);
|
paymentToken = await PaymobManager().getPaymentKey(amount, currency);
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
// Handle errors gracefully, e.g., display error message to user
|
// Handle errors gracefully, e.g., display error message to user
|
||||||
print("Error fetching payment key: $e");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,23 +68,17 @@ class PaymobManager extends GetxController {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
final paymentData = response.data; // Assuming JSON response
|
final paymentData = response.data; // Assuming JSON response
|
||||||
|
|
||||||
print("redirection_url: ${paymentData['iframe_redirection_url']}");
|
|
||||||
|
|
||||||
// Navigate to success screen or display success message
|
// Navigate to success screen or display success message
|
||||||
launchUrl(Uri.parse(paymentData['iframe_redirection_url']));
|
launchUrl(Uri.parse(paymentData['iframe_redirection_url']));
|
||||||
} else {
|
} else {
|
||||||
// Payment failed: Handle errors (e.g., display error message)
|
// Payment failed: Handle errors (e.g., display error message)
|
||||||
print("Payment failed: ${response.statusCode} - ${response.data}");
|
|
||||||
}
|
}
|
||||||
} on DioError catch (e) {
|
} on DioError catch (e) {
|
||||||
// Handle network or Dio-related errors
|
// Handle network or Dio-related errors
|
||||||
print("Error making payment request: $e");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> _getStatusAfterPaid() async {
|
Future<String> _getStatusAfterPaid() async {
|
||||||
print(authanticationToken1);
|
|
||||||
print(orderId1);
|
|
||||||
final dio.Response response = await Dio().post(
|
final dio.Response response = await Dio().post(
|
||||||
"https://accept.paymob.com/api/ecommerce/orders/transaction_inquiry",
|
"https://accept.paymob.com/api/ecommerce/orders/transaction_inquiry",
|
||||||
data: {
|
data: {
|
||||||
@@ -95,8 +86,6 @@ class PaymobManager extends GetxController {
|
|||||||
"merchant_order_id": "970960",
|
"merchant_order_id": "970960",
|
||||||
"order_id": orderId1
|
"order_id": orderId1
|
||||||
});
|
});
|
||||||
print(response.data);
|
|
||||||
print(response.data['success']);
|
|
||||||
return response.data["success"];
|
return response.data["success"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,8 +112,6 @@ class PaymobManager extends GetxController {
|
|||||||
"delivery_needed": "false",
|
"delivery_needed": "false",
|
||||||
"items": [],
|
"items": [],
|
||||||
});
|
});
|
||||||
print('id is');
|
|
||||||
print(response.data["id"]);
|
|
||||||
return response.data["id"];
|
return response.data["id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ class PaymobPayment {
|
|||||||
'api_key': _apiKey,
|
'api_key': _apiKey,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.data['token']);
|
|
||||||
|
|
||||||
return response.data['token'];
|
return response.data['token'];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -105,7 +104,6 @@ class PaymobPayment {
|
|||||||
"items": items,
|
"items": items,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.data['id']);
|
|
||||||
|
|
||||||
return response.data['id'];
|
return response.data['id'];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -138,7 +136,6 @@ class PaymobPayment {
|
|||||||
if (message != null) {
|
if (message != null) {
|
||||||
throw Exception(message);
|
throw Exception(message);
|
||||||
}
|
}
|
||||||
print(response.data['token']);
|
|
||||||
return response.data['token'];
|
return response.data['token'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ class PaymobPaymentWallet {
|
|||||||
'api_key': _apiKey,
|
'api_key': _apiKey,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.data['token']);
|
|
||||||
return response.data['token'];
|
return response.data['token'];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
rethrow;
|
||||||
@@ -104,7 +103,6 @@ class PaymobPaymentWallet {
|
|||||||
"items": items,
|
"items": items,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
print(response.data['id']);
|
|
||||||
return response.data['id'];
|
return response.data['id'];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rethrow;
|
rethrow;
|
||||||
@@ -136,7 +134,6 @@ class PaymobPaymentWallet {
|
|||||||
// if (message != null) {
|
// if (message != null) {
|
||||||
// throw Exception(message);
|
// throw Exception(message);
|
||||||
// }
|
// }
|
||||||
print(response.data['token']);
|
|
||||||
return response.data['token'];
|
return response.data['token'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,16 +158,13 @@ class PaymobPaymentWallet {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
final paymentData = response.data; // Assuming JSON response
|
final paymentData = response.data; // Assuming JSON response
|
||||||
|
|
||||||
print("redirection_url: ${paymentData['iframe_redirection_url']}");
|
|
||||||
return paymentData['iframe_redirection_url'];
|
return paymentData['iframe_redirection_url'];
|
||||||
// Navigate to success screen or display success message
|
// Navigate to success screen or display success message
|
||||||
} else {
|
} else {
|
||||||
// Payment failed: Handle errors (e.g., display error message)
|
// Payment failed: Handle errors (e.g., display error message)
|
||||||
print("Payment failed: ${response.statusCode} - ${response.data}");
|
|
||||||
}
|
}
|
||||||
} on DioError catch (e) {
|
} on DioError catch (e) {
|
||||||
// Handle network or Dio-related errors
|
// Handle network or Dio-related errors
|
||||||
print("Error making payment request: $e");
|
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ class CaptainProfileController extends GetxController {
|
|||||||
var d = jsonDecode(res);
|
var d = jsonDecode(res);
|
||||||
captainProfileData = d['message'];
|
captainProfileData = d['message'];
|
||||||
update();
|
update();
|
||||||
print(d['message']);
|
|
||||||
box.write(BoxName.sexDriver, d['message']['gender']);
|
box.write(BoxName.sexDriver, d['message']['gender']);
|
||||||
box.write(BoxName.dobDriver, d['message']['birthdate']);
|
box.write(BoxName.dobDriver, d['message']['birthdate']);
|
||||||
box.write(BoxName.vin, d['message']['vin']);
|
box.write(BoxName.vin, d['message']['vin']);
|
||||||
|
|||||||
@@ -230,19 +230,13 @@ class LoginPage extends StatelessWidget {
|
|||||||
User? user =
|
User? user =
|
||||||
await authController.signInWithApple();
|
await authController.signInWithApple();
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
print(
|
|
||||||
"Successfully signed in: ${user.email}");
|
|
||||||
print(
|
|
||||||
"Successfully signed in: ${user.uid}");
|
|
||||||
box.write(BoxName.driverID, user.uid);
|
box.write(BoxName.driverID, user.uid);
|
||||||
box.write(
|
box.write(
|
||||||
BoxName.emailDriver, user.email);
|
BoxName.emailDriver, user.email);
|
||||||
await GoogleSignInHelper
|
await GoogleSignInHelper
|
||||||
.signInFromLogin();
|
.signInFromLogin();
|
||||||
// Navigate to another screen or perform other actions
|
// Navigate to another screen or perform other actions
|
||||||
} else {
|
} else {}
|
||||||
print("Sign-in failed");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
kolor: AppColor.primaryColor,
|
kolor: AppColor.primaryColor,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ class FrequentlyQuestionsPage extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Get.find<MapPassengerController>()
|
Get.find<MapPassengerController>()
|
||||||
.getDialog('title', 'midTitle', () {
|
.getDialog('title', 'midTitle', () {
|
||||||
print(
|
; //todo add in this dialog papers for driver
|
||||||
'dd'); //todo add in this dialog papers for driver
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ class _PassengerCallPageState extends State<PassengerCallPage> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
_remoteUid = int.parse(widget.remoteID);
|
_remoteUid = int.parse(widget.remoteID);
|
||||||
uid = int.parse(box.read(BoxName.phone));
|
uid = int.parse(box.read(BoxName.phone));
|
||||||
print('remoteid is ${widget.remoteID}');
|
|
||||||
print('token is ${widget.token}');
|
|
||||||
print('channelName is ${widget.channelName}');
|
|
||||||
// Set up an instance of Agora engine
|
// Set up an instance of Agora engine
|
||||||
initAgora();
|
initAgora();
|
||||||
}
|
}
|
||||||
@@ -66,8 +63,6 @@ class _PassengerCallPageState extends State<PassengerCallPage> {
|
|||||||
//create an instance of the Agora engine
|
//create an instance of the Agora engine
|
||||||
agoraEngine = createAgoraRtcEngine();
|
agoraEngine = createAgoraRtcEngine();
|
||||||
await agoraEngine.initialize(RtcEngineContext(appId: AK.agoraAppId));
|
await agoraEngine.initialize(RtcEngineContext(appId: AK.agoraAppId));
|
||||||
print('eeeeeeeeeeeeeeeeeeee');
|
|
||||||
print(agoraEngine);
|
|
||||||
// Register the event handler
|
// Register the event handler
|
||||||
agoraEngine.registerEventHandler(
|
agoraEngine.registerEventHandler(
|
||||||
RtcEngineEventHandler(
|
RtcEngineEventHandler(
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ GetBuilder<MapPassengerController> cancelRidePage() {
|
|||||||
value: index,
|
value: index,
|
||||||
groupValue: controller.selectedReason,
|
groupValue: controller.selectedReason,
|
||||||
onChanged: (int? value) {
|
onChanged: (int? value) {
|
||||||
// print(value);
|
|
||||||
// print(reasons[index]);
|
|
||||||
controller.selectReason(
|
controller.selectReason(
|
||||||
value!,
|
value!,
|
||||||
reasons[index].toString(),
|
reasons[index].toString(),
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ GetBuilder<MapPassengerController> hexagonClipper() {
|
|||||||
),
|
),
|
||||||
// IconButton(
|
// IconButton(
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// print(controller.dataCarsLocationByPassenger);
|
|
||||||
// },
|
// },
|
||||||
// icon: const Icon(Icons.add),
|
// icon: const Icon(Icons.add),
|
||||||
// ),
|
// ),
|
||||||
|
|||||||
@@ -102,14 +102,12 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
|||||||
controller.changePickerShown();
|
controller.changePickerShown();
|
||||||
} else {
|
} else {
|
||||||
controller.hintTextDestinationPoint = 'To Work';
|
controller.hintTextDestinationPoint = 'To Work';
|
||||||
print(box.read(BoxName.addWork));
|
|
||||||
final latLng = LatLng(
|
final latLng = LatLng(
|
||||||
double.parse(
|
double.parse(
|
||||||
box.read(BoxName.addWork).split(',')[0]),
|
box.read(BoxName.addWork).split(',')[0]),
|
||||||
double.parse(
|
double.parse(
|
||||||
box.read(BoxName.addWork).split(',')[1]),
|
box.read(BoxName.addWork).split(',')[1]),
|
||||||
);
|
);
|
||||||
print(latLng);
|
|
||||||
controller.newMyLocation =
|
controller.newMyLocation =
|
||||||
controller.newStartPointLocation;
|
controller.newStartPointLocation;
|
||||||
controller.changeMainBottomMenuMap();
|
controller.changeMainBottomMenuMap();
|
||||||
@@ -178,14 +176,12 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
|||||||
controller.changePickerShown();
|
controller.changePickerShown();
|
||||||
} else {
|
} else {
|
||||||
controller.hintTextDestinationPoint = 'To Home';
|
controller.hintTextDestinationPoint = 'To Home';
|
||||||
print(box.read(BoxName.addHome));
|
|
||||||
final latLng = LatLng(
|
final latLng = LatLng(
|
||||||
double.parse(
|
double.parse(
|
||||||
box.read(BoxName.addHome).split(',')[0]),
|
box.read(BoxName.addHome).split(',')[0]),
|
||||||
double.parse(
|
double.parse(
|
||||||
box.read(BoxName.addHome).split(',')[1]),
|
box.read(BoxName.addHome).split(',')[1]),
|
||||||
);
|
);
|
||||||
print(latLng);
|
|
||||||
controller.changeMainBottomMenuMap();
|
controller.changeMainBottomMenuMap();
|
||||||
|
|
||||||
// controller.newMyLocation = latLng;
|
// controller.newMyLocation = latLng;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ GetBuilder<MapPassengerController> formSearchPlaces(int index) {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
controller.startLocationFromMapAll[index] = true;
|
controller.startLocationFromMapAll[index] = true;
|
||||||
controller.wayPointIndex = index;
|
controller.wayPointIndex = index;
|
||||||
print(controller.wayPointIndex);
|
|
||||||
Get.back();
|
Get.back();
|
||||||
// controller.changeMainBottomMenuMap();
|
// controller.changeMainBottomMenuMap();
|
||||||
controller.changeWayPointStopsSheet();
|
controller.changeWayPointStopsSheet();
|
||||||
|
|||||||
@@ -354,9 +354,6 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
|||||||
controller.newStartPointLocation = position.target;
|
controller.newStartPointLocation = position.target;
|
||||||
}
|
}
|
||||||
controller.newMyLocation = position.target;
|
controller.newMyLocation = position.target;
|
||||||
|
|
||||||
// print('my' + controller.mylocation.toString());
|
|
||||||
// print('new' + controller.newMylocation.toString());
|
|
||||||
},
|
},
|
||||||
myLocationEnabled: true,
|
myLocationEnabled: true,
|
||||||
// liteModeEnabled: true,
|
// liteModeEnabled: true,
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
import 'package:SEFER/constant/style.dart';
|
|
||||||
import 'package:SEFER/constant/table_names.dart';
|
|
||||||
import 'package:SEFER/controller/functions/crud.dart';
|
|
||||||
import 'package:SEFER/main.dart';
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:path/path.dart' as path;
|
|
||||||
import '../../../constant/box_name.dart';
|
import '../../../constant/box_name.dart';
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/links.dart';
|
|
||||||
import '../../../controller/functions/audio_record1.dart';
|
|
||||||
import '../../../controller/functions/tts.dart';
|
import '../../../controller/functions/tts.dart';
|
||||||
import '../../../controller/functions/upload_image.dart';
|
|
||||||
import '../../../controller/home/map_passenger_controller.dart';
|
import '../../../controller/home/map_passenger_controller.dart';
|
||||||
|
|
||||||
GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
||||||
@@ -150,21 +143,14 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
// // String apiKey = AK.payPalSecret;
|
// // String apiKey = AK.payPalSecret;
|
||||||
// // String convertedStringN = credentials.c(
|
// // String convertedStringN = credentials.c(
|
||||||
// // credentials.c(credentials.c(apiKey, cs), cC), cn);
|
// // credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||||
// // print('Converted v: $convertedStringN');
|
|
||||||
//
|
//
|
||||||
// // String retrievedStringS = credentials.r(
|
// // String retrievedStringS = credentials.r(
|
||||||
// // credentials.r(credentials.r(convertedStringN, cn), cC),
|
// // credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||||
// // cs);
|
// // cs);
|
||||||
// // print('Retrieved String: $retrievedStringS');
|
|
||||||
// // //
|
// // //
|
||||||
// // if (retrievedStringS == apiKey) {
|
// // if (retrievedStringS == apiKey) {
|
||||||
// // print('same');
|
|
||||||
// // }
|
// // }
|
||||||
//
|
//
|
||||||
// // print(box.read(BoxName.passengerWalletTotal));
|
|
||||||
// // print(box.read(BoxName.name));
|
|
||||||
// // print(box.read(BoxName.phone));
|
|
||||||
// // print(box.read(BoxName.email));
|
|
||||||
// // await Get.find<PaymentController>()
|
// // await Get.find<PaymentController>()
|
||||||
// // .payWithPayMob(context, '1100', 'EGP');
|
// // .payWithPayMob(context, '1100', 'EGP');
|
||||||
// // Initiates a payment with a card using the FlutterPaymob instance
|
// // Initiates a payment with a card using the FlutterPaymob instance
|
||||||
@@ -172,7 +158,6 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
// // NotificationController()
|
// // NotificationController()
|
||||||
// // .showNotification('Order', 'hi this is', 'tone1');
|
// // .showNotification('Order', 'hi this is', 'tone1');
|
||||||
// // Get.to(() => DriverCallPage());
|
// // Get.to(() => DriverCallPage());
|
||||||
// // print(controller.carLocationsModels);
|
|
||||||
// // controller.getKazanPercent();
|
// // controller.getKazanPercent();
|
||||||
// // PassengerCallPage(
|
// // PassengerCallPage(
|
||||||
// // channelName: '',
|
// // channelName: '',
|
||||||
@@ -180,7 +165,6 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
// // remoteID: '',
|
// // remoteID: '',
|
||||||
// // )
|
// // )
|
||||||
// // Get.to(() => const CallPage());
|
// // Get.to(() => const CallPage());
|
||||||
// // print(box.read(BoxName.lang));
|
|
||||||
// await Get.find<AudioRecorderController>().startRecording();
|
// await Get.find<AudioRecorderController>().startRecording();
|
||||||
// },
|
// },
|
||||||
// icon: Icon(
|
// icon: Icon(
|
||||||
|
|||||||
@@ -384,7 +384,6 @@ class FaviouratePlacesDialog extends StatelessWidget {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
List favoritePlaces =
|
List favoritePlaces =
|
||||||
await sql.getAllData(TableName.placesFavorite);
|
await sql.getAllData(TableName.placesFavorite);
|
||||||
// print(favoritePlaces);
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Favorite Places'.tr,
|
title: 'Favorite Places'.tr,
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
List favoritePlaces = await sql
|
List favoritePlaces = await sql
|
||||||
.getAllData(TableName.placesFavorite);
|
.getAllData(TableName.placesFavorite);
|
||||||
print(favoritePlaces);
|
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Favorite Places'.tr,
|
title: 'Favorite Places'.tr,
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
@@ -201,7 +200,6 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
|
|||||||
controller.bottomSheet();
|
controller.bottomSheet();
|
||||||
// await sql
|
// await sql
|
||||||
// .getAllData(TableName.placesFavorite)
|
// .getAllData(TableName.placesFavorite)
|
||||||
// .then((value) => print(value));
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (controller.isPickerShown &&
|
if (controller.isPickerShown &&
|
||||||
|
|||||||
@@ -264,7 +264,6 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
width: Get.width * .15,
|
width: Get.width * .15,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
print(box.read(BoxName.sosPhonePassenger));
|
|
||||||
if (box.read(BoxName.sosPhonePassenger) == null ||
|
if (box.read(BoxName.sosPhonePassenger) == null ||
|
||||||
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
||||||
{
|
{
|
||||||
@@ -278,7 +277,6 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
.read(BoxName.sosPhonePassenger)
|
.read(BoxName.sosPhonePassenger)
|
||||||
.toString();
|
.toString();
|
||||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||||
print(phoneNumber); // Output: 798583061
|
|
||||||
var phone = box.read(BoxName.countryCode) ==
|
var phone = box.read(BoxName.countryCode) ==
|
||||||
'Egypt'
|
'Egypt'
|
||||||
? '+2${box.read(BoxName.sosPhonePassenger)}'
|
? '+2${box.read(BoxName.sosPhonePassenger)}'
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ class RideFromStartApp extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
print(box.read(BoxName.sosPhonePassenger));
|
|
||||||
if (box.read(BoxName.sosPhonePassenger) == null ||
|
if (box.read(BoxName.sosPhonePassenger) == null ||
|
||||||
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
box.read(BoxName.sosPhonePassenger) == 'sos') {
|
||||||
{
|
{
|
||||||
@@ -152,7 +151,6 @@ class RideFromStartApp extends StatelessWidget {
|
|||||||
.read(BoxName.sosPhonePassenger)
|
.read(BoxName.sosPhonePassenger)
|
||||||
.toString();
|
.toString();
|
||||||
// phoneNumber = phoneNumber.replaceAll('0', '');
|
// phoneNumber = phoneNumber.replaceAll('0', '');
|
||||||
print(phoneNumber); // Output: 798583061
|
|
||||||
var phone =
|
var phone =
|
||||||
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
// '+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||||
'${box.read(BoxName.sosPhonePassenger)}';
|
'${box.read(BoxName.sosPhonePassenger)}';
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ class OrderHistory extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
String mapUrl =
|
String mapUrl =
|
||||||
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
|
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
|
||||||
// print(mapUrl);
|
|
||||||
showInBrowser(mapUrl);
|
showInBrowser(mapUrl);
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|||||||
@@ -138,9 +138,7 @@ class PromosPassengerPage extends StatelessWidget {
|
|||||||
textStyle: AppStyle.title),
|
textStyle: AppStyle.title),
|
||||||
],
|
],
|
||||||
isRepeatingAnimation: true,
|
isRepeatingAnimation: true,
|
||||||
onTap: () {
|
onTap: () {},
|
||||||
print("Tap Event");
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
rides['description'],
|
rides['description'],
|
||||||
|
|||||||
Reference in New Issue
Block a user