This commit is contained in:
Hamza-Ayed
2024-07-05 04:51:14 +03:00
parent b48bcfdebb
commit fec02b13ee
40 changed files with 652 additions and 194 deletions

View File

@@ -10,6 +10,7 @@ import 'package:get/get.dart';
import '../../../constant/box_name.dart';
import '../../../controller/functions/launch.dart';
import '../../widgets/my_textField.dart';
class ApplyOrderWidget extends StatelessWidget {
const ApplyOrderWidget({super.key});
@@ -184,10 +185,9 @@ class ApplyOrderWidget extends StatelessWidget {
title: 'Select one message'.tr,
titleStyle: AppStyle.title,
content: SizedBox(
width: Get.width * .6,
height: Get.height * .5,
child: Column(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
child: ListView(
children: [
InkWell(
onTap: () {
@@ -216,11 +216,14 @@ class ApplyOrderWidget extends StatelessWidget {
),
),
),
const SizedBox(
height: 5,
),
InkWell(
onTap: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
'message From passenger'.tr,
'My location is correct. You can search for me using the navigation app'
.tr,
controller.driverToken,
@@ -243,12 +246,16 @@ class ApplyOrderWidget extends StatelessWidget {
),
),
),
const SizedBox(
height: 5,
),
InkWell(
onTap: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
'I\'m waiting for you'.tr,
'My location is correct. You can search for me using the navigation app'
.tr,
controller.driverToken,
'ding.wav',
);
@@ -268,6 +275,84 @@ class ApplyOrderWidget extends StatelessWidget {
),
),
),
const SizedBox(
height: 5,
),
InkWell(
onTap: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
"How much longer will you be?"
.tr,
controller.driverToken,
'ding.wav',
);
Get.back();
},
child: Container(
decoration:
AppStyle.boxDecoration1,
child: Padding(
padding:
const EdgeInsets.all(
10),
child: Text(
"How much longer will you be?"
.tr,
style: AppStyle.title,
),
),
),
),
const SizedBox(
height: 5,
),
SizedBox(
width: Get.width * .5,
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Form(
key: controller
.messagesFormKey,
child: SizedBox(
width: Get.width * .4,
child: MyTextForm(
controller: controller
.messageToDriver,
label:
'Type Any thing'
.tr,
hint:
'Type Any thing'
.tr,
type:
TextInputType
.name),
)),
IconButton(
onPressed: () {
FirebaseMessagesController()
.sendNotificationToAnyWithoutData(
'message From passenger',
controller
.messageToDriver
.text,
controller
.driverToken,
'ding.wav');
controller
.messageToDriver
.clear();
Get.back();
},
icon: const Icon(
Icons.send))
],
),
)
],
),
));