11/10/1
This commit is contained in:
@@ -98,7 +98,7 @@ class CupertinoDrawerCaptain extends StatelessWidget {
|
||||
_buildDrawerItem(
|
||||
icon: CupertinoIcons.mail,
|
||||
text: "Contact Us".tr,
|
||||
onTap: () => Get.to(() => const SettingsCaptain()),
|
||||
onTap: () => Get.to(() => ContactUsPage()),
|
||||
),
|
||||
_buildDivider(),
|
||||
_buildDrawerItem(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/local_notification.dart';
|
||||
@@ -10,8 +11,12 @@ import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
|
||||
import 'package:timezone/data/latest.dart' as tz;
|
||||
import 'package:timezone/timezone.dart' as tz;
|
||||
import '../../../../../constant/colors.dart';
|
||||
import '../../../../../constant/notification.dart';
|
||||
import '../../../../../controller/functions/audio_controller.dart';
|
||||
import '../../../../../print.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
import '../../driver_map_page.dart';
|
||||
@@ -180,30 +185,53 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
),
|
||||
// Platform.isAndroid
|
||||
// ?
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColor.secondaryColor,
|
||||
// border: Border.all(color: AppColor.blueColor),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: Builder(builder: (context) {
|
||||
// return IconButton(
|
||||
// onPressed: () async {
|
||||
// // NotificationController().showNotification(
|
||||
// // ' message.notification!.title.toString()',
|
||||
// // ' message.notification!.body.toString()',
|
||||
// // 'order',
|
||||
// // '');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.window_close,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(color: AppColor.blueColor),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: Builder(builder: (context) {
|
||||
return IconButton(
|
||||
onPressed: () async {
|
||||
// NotificationController().showNotification(
|
||||
// ' message.notification!.title.toString()',
|
||||
// ' message.notification!.body.toString()',
|
||||
// 'order',
|
||||
// '');
|
||||
|
||||
NotificationController notificationController =
|
||||
Get.put(NotificationController());
|
||||
await notificationController.initNotifications();
|
||||
final random = Random();
|
||||
final randomMessage =
|
||||
driverMessages[random.nextInt(driverMessages.length)];
|
||||
Log.print(
|
||||
' randomMessage.split[0]: ${randomMessage.split(':')[0]}');
|
||||
Log.print(
|
||||
' randomMessage.split([1]: ${randomMessage.split(':')[1]}');
|
||||
// Schedule the notification with the random message
|
||||
notificationController.showNotification(
|
||||
randomMessage.split(':')[0],
|
||||
randomMessage.split(':')[1],
|
||||
"ding",
|
||||
'');
|
||||
|
||||
// notificationController.scheduleNotificationEvery10Hours(
|
||||
// "افتح التطبيق".tr,
|
||||
// "افتح التطبيق لتبقى على اطلاع واستعداد للمهام القادمة.".tr,
|
||||
// "ding",
|
||||
// );
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome5.window_close,
|
||||
size: 29,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
// : const SizedBox(),
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
|
||||
Reference in New Issue
Block a user