Update: 2026-06-12 01:23:54
This commit is contained in:
@@ -249,7 +249,8 @@ class CaptainDetailsPage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(12)),
|
||||
),
|
||||
onPressed: () {
|
||||
Get.to(() => DriverScorecardPage(driverId: data['id'].toString()));
|
||||
Get.to(
|
||||
() => DriverScorecardPage(driverId: data['id'].toString()));
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -380,11 +381,11 @@ class CaptainDetailsPage extends StatelessWidget {
|
||||
// Check if key is valid (might be recreated)
|
||||
if (controller.formCaptainPrizeKey.currentState?.validate() ??
|
||||
true) {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
controller.titleNotify.text,
|
||||
controller.bodyNotify.text,
|
||||
data['passengerToken'] ?? '', // Safety check
|
||||
'order.wav');
|
||||
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
// controller.titleNotify.text,
|
||||
// controller.bodyNotify.text,
|
||||
// data['passengerToken'] ?? '', // Safety check
|
||||
// 'order.wav');
|
||||
Get.back();
|
||||
Get.snackbar("Success", "Notification Sent",
|
||||
backgroundColor: Colors.green.withOpacity(0.2));
|
||||
|
||||
@@ -393,11 +393,11 @@ class PassengerDetailsPage extends StatelessWidget {
|
||||
onPressed: () {
|
||||
// Validate form safely
|
||||
if (controller.formPrizeKey.currentState?.validate() ?? false) {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
controller.titleNotify.text,
|
||||
controller.bodyNotify.text,
|
||||
data['passengerToken'],
|
||||
'order.wav');
|
||||
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
// controller.titleNotify.text,
|
||||
// controller.bodyNotify.text,
|
||||
// data['passengerToken'],
|
||||
// 'order.wav');
|
||||
Get.back();
|
||||
Get.snackbar('Success', 'Notification sent successfully!',
|
||||
backgroundColor: Colors.green.withOpacity(0.2));
|
||||
|
||||
Reference in New Issue
Block a user