6/30/1
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/box_name.dart';
|
||||
import '../../../controller/functions/launch.dart';
|
||||
|
||||
class ApplyOrderWidget extends StatelessWidget {
|
||||
const ApplyOrderWidget({super.key});
|
||||
@@ -108,7 +109,23 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/blob.png',
|
||||
box.read(BoxName.carType) == 'Comfort'
|
||||
? 'assets/images/blob.png'
|
||||
: box.read(BoxName.carType) == 'Lady'
|
||||
? 'assets/images/lady.png' // Assuming there's an image for Lady
|
||||
: box.read(BoxName.carType) == 'Speed'
|
||||
? 'assets/images/carspeed.png'
|
||||
: box.read(BoxName.carType) ==
|
||||
'Delivery'
|
||||
? 'assets/images/moto.png'
|
||||
: box.read(BoxName.carType) ==
|
||||
'Mashwari'
|
||||
? 'assets/images/freeRide.png'
|
||||
: box.read(BoxName
|
||||
.carType) ==
|
||||
'Rayeh Gai'
|
||||
? 'assets/images/roundtrip.png'
|
||||
: 'assets/images/carspeed.png', // Default image if none of the above
|
||||
width: 80,
|
||||
),
|
||||
Column(
|
||||
@@ -176,11 +193,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
onTap: () {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToAnyWithoutData(
|
||||
'message From passenger',
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
controller
|
||||
.driverToken);
|
||||
'message From passenger',
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
controller.driverToken,
|
||||
'ding.wav',
|
||||
);
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
@@ -202,11 +220,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
onTap: () {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToAnyWithoutData(
|
||||
'message From passenger',
|
||||
'My location is correct. You can search for me using the navigation app'
|
||||
.tr,
|
||||
controller
|
||||
.driverToken);
|
||||
'message From passenger',
|
||||
'My location is correct. You can search for me using the navigation app'
|
||||
.tr,
|
||||
controller.driverToken,
|
||||
'ding.wav',
|
||||
);
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
@@ -228,11 +247,11 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
onTap: () {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToAnyWithoutData(
|
||||
'message From passenger',
|
||||
'I\'m waiting for you'
|
||||
.tr,
|
||||
controller
|
||||
.driverToken);
|
||||
'message From passenger',
|
||||
'I\'m waiting for you'.tr,
|
||||
controller.driverToken,
|
||||
'ding.wav',
|
||||
);
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
@@ -260,10 +279,11 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
HapticFeedback.heavyImpact();
|
||||
// Get.to(() => const CallPage());
|
||||
// Get.to(() => PassengerCallPage());
|
||||
makePhoneCall(controller.driverPhone);
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.call,
|
||||
|
||||
Reference in New Issue
Block a user