187 lines
7.8 KiB
Dart
187 lines
7.8 KiB
Dart
import 'package:SEFER/constant/box_name.dart';
|
|
import 'package:SEFER/main.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
|
import '../../../constant/colors.dart';
|
|
import '../../../controller/firebase/firbase_messge.dart';
|
|
import '../../../controller/functions/tts.dart';
|
|
import '../../../controller/home/map_passenger_controller.dart';
|
|
|
|
GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|
final textToSpeechController = Get.put(TextToSpeechController());
|
|
return GetBuilder<MapPassengerController>(
|
|
builder: (controller) => Positioned(
|
|
top: Get.height * .008,
|
|
left: Get.width * .2,
|
|
child: Builder(builder: (context) {
|
|
return Row(
|
|
children: [
|
|
AnimatedContainer(
|
|
duration: const Duration(microseconds: 200),
|
|
width: controller.widthMapTypeAndTraffic,
|
|
decoration: BoxDecoration(
|
|
border: Border.all(),
|
|
color: AppColor.secondaryColor,
|
|
borderRadius: BorderRadius.circular(15)),
|
|
child: IconButton(
|
|
onPressed: () {
|
|
controller.changeMapType();
|
|
// Toast.show(context, 'This is a toast message!');
|
|
},
|
|
icon: const Icon(
|
|
Icons.satellite_alt,
|
|
size: 29,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 5,
|
|
),
|
|
AnimatedContainer(
|
|
duration: const Duration(microseconds: 200),
|
|
width: controller.widthMapTypeAndTraffic,
|
|
decoration: BoxDecoration(
|
|
color: AppColor.secondaryColor,
|
|
border: Border.all(),
|
|
borderRadius: BorderRadius.circular(15)),
|
|
child: IconButton(
|
|
onPressed: () {
|
|
controller.changeMapTraffic();
|
|
// Toast.show(context, 'This is a toast message!');
|
|
},
|
|
icon: const Icon(
|
|
Icons.streetview_sharp,
|
|
size: 29,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 5,
|
|
),
|
|
// if (Platform.isIOS)
|
|
AnimatedContainer(
|
|
duration: const Duration(microseconds: 200),
|
|
width: controller.widthMapTypeAndTraffic,
|
|
decoration: BoxDecoration(
|
|
color: AppColor.secondaryColor,
|
|
border: Border.all(),
|
|
borderRadius: BorderRadius.circular(15)),
|
|
child: IconButton(
|
|
onPressed: () {
|
|
controller.mapController?.animateCamera(
|
|
CameraUpdate.newLatLng(LatLng(
|
|
controller.passengerLocation.latitude,
|
|
controller.passengerLocation.longitude)));
|
|
},
|
|
icon: const Icon(
|
|
Icons.location_on,
|
|
size: 29,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 5,
|
|
),
|
|
// AnimatedContainer(
|
|
// duration: const Duration(microseconds: 200),
|
|
// width: controller.widthMapTypeAndTraffic,
|
|
// decoration: BoxDecoration(
|
|
// color: AppColor.secondaryColor,
|
|
// border: Border.all(),
|
|
// borderRadius: BorderRadius.circular(15)),
|
|
// child: IconButton(
|
|
// onPressed: () async {
|
|
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
|
// 'Order'.tr,
|
|
// 'from: ',
|
|
// // jsonDecode(value)['message'].toString(),
|
|
// 'dEugS-JOT4Ka5riF4s5TEN:APA91bEDL_W7BuEQGbyL-RMaKiMWDlURXhFuaybe5WurTUV8K5eIooSGe22yY22_U2hEZcfPr46ig1v--l00dbOGiivazxvmTyhUyQQW6lJsuIN-wordGtBxtREyeYtEKvxIa1J4ApEu',
|
|
// 'order.wav'
|
|
|
|
// // polylineCoordinates.toString()
|
|
// );
|
|
// // print(box.read(BoxName.tokenFCM));
|
|
// //
|
|
// },
|
|
// icon: const Icon(
|
|
// Icons.voice_chat,
|
|
// size: 29,
|
|
// ),
|
|
// ),
|
|
// ),
|
|
AnimatedContainer(
|
|
duration: const Duration(microseconds: 200),
|
|
width: controller.widthMapTypeAndTraffic,
|
|
decoration: BoxDecoration(
|
|
color: AppColor.secondaryColor,
|
|
border: Border.all(),
|
|
borderRadius: BorderRadius.circular(15)),
|
|
child: IconButton(
|
|
onPressed: () async {
|
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
|
'message From passenger'.tr,
|
|
'My location is correct. You can search for me using the navigation app'
|
|
.tr,
|
|
'db9hQ9BfT_2U-ocVHbEAej:APA91bG2YiVN8Dw3bNitehENk0sUPKt7A3zoT6GY_NdbxsMVKX8ouZRI6Ix9ScLSGYz31gugsb2Ag087FXmbPbQkD9E7nwOR7USPrai5euFjZXVHNrz2Byacn8gBTGr8HPV-CGHG81lk',
|
|
[],
|
|
'ding.wav',
|
|
);
|
|
// print(box.read(BoxName.tokenFCM));
|
|
},
|
|
icon: const Icon(
|
|
Icons.chat,
|
|
size: 29,
|
|
),
|
|
),
|
|
),
|
|
// AnimatedContainer(
|
|
// duration: const Duration(microseconds: 200),
|
|
// width: controller.widthMapTypeAndTraffic,
|
|
// decoration: BoxDecoration(
|
|
// color: AppColor.secondaryColor,
|
|
// border: Border.all(),
|
|
// borderRadius: BorderRadius.circular(15)),
|
|
// child: IconButton(
|
|
// onPressed: () async {
|
|
// await CRUD().allMethodForAI(
|
|
// 'name,fullName,address,idNumber,cardId,dob',
|
|
// AppLink.uploadEgypt,
|
|
// 'idFront');
|
|
//
|
|
// // await ImageController().choosImage(
|
|
// // 'https://api.sefer.live/sefer/uploadEgypt.php',
|
|
// // 'FrontId');
|
|
// AC credentials = AC();
|
|
// String apiKey = 'zjujl_qvo_fwjfgjlXrXlBl';
|
|
// String convertedStringN = credentials.c(
|
|
// credentials.c(credentials.c(apiKey, cs), cC), cn);
|
|
|
|
// String retrievedStringS = credentials.r(
|
|
// credentials.r(credentials.r(convertedStringN, cn), cC),
|
|
// cs);
|
|
// //
|
|
// if (retrievedStringS == apiKey) {
|
|
// print('convertedStringN --- $convertedStringN');
|
|
// print('retrievedStringS ---$retrievedStringS');
|
|
// print('same');
|
|
// }
|
|
//
|
|
// // await Get.find<PaymentController>()
|
|
// // .payWithPayMob(context, '1100', 'EGP');
|
|
// // Initiates a payment with a card using the FlutterPaymob instance
|
|
//
|
|
// },
|
|
// icon: const Icon(
|
|
// // Get.put(AudioRecorderController()).isRecording
|
|
// Icons.start,
|
|
// size: 29,
|
|
// ),
|
|
// ),
|
|
// ),
|
|
],
|
|
);
|
|
})),
|
|
);
|
|
}
|