25-8-9-1
This commit is contained in:
@@ -147,7 +147,7 @@ class VideoPlayerPage extends StatelessWidget {
|
||||
class VideoPlayerPage1 extends StatelessWidget {
|
||||
final String videoUrl;
|
||||
|
||||
VideoPlayerPage1({required this.videoUrl});
|
||||
const VideoPlayerPage1({required this.videoUrl});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:sefer_driver/constant/box_name.dart';
|
||||
import 'package:sefer_driver/constant/links.dart';
|
||||
import 'package:sefer_driver/controller/functions/upload_image.dart';
|
||||
import 'package:sefer_driver/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:sefer_driver/device_compatibility_page.dart';
|
||||
import 'package:sefer_driver/main.dart';
|
||||
|
||||
// استيراد الصفحات الأخرى... تأكد من صحة المسارات
|
||||
@@ -105,6 +106,11 @@ class AppDrawer extends StatelessWidget {
|
||||
icon: Icons.star,
|
||||
color: Colors.amber,
|
||||
onTap: () => Get.to(() => RatingScreen())),
|
||||
DrawerItem(
|
||||
title: 'Is device compatible'.tr,
|
||||
icon: Icons.memory,
|
||||
color: Colors.greenAccent,
|
||||
onTap: () => Get.to(() => DeviceCompatibilityPage())),
|
||||
DrawerItem(
|
||||
title: 'Settings'.tr,
|
||||
icon: Icons.settings,
|
||||
@@ -228,7 +234,10 @@ class UserHeader extends StatelessWidget {
|
||||
fontSize: 18,
|
||||
shadows: [Shadow(blurRadius: 2, color: Colors.black26)]),
|
||||
),
|
||||
accountEmail: Text(box.read(BoxName.emailDriver)),
|
||||
accountEmail:
|
||||
box.read(BoxName.emailDriver).toString().contains('intaleqapp')
|
||||
? Text('Your email not updated yet'.tr)
|
||||
: Text(box.read(BoxName.emailDriver)),
|
||||
currentAccountPicture: GetBuilder<ImageController>(
|
||||
builder: (controller) => Stack(
|
||||
clipBehavior: Clip.none,
|
||||
|
||||
@@ -1,25 +1,21 @@
|
||||
import 'package:sefer_driver/constant/box_name.dart';
|
||||
import 'package:sefer_driver/controller/firebase/local_notification.dart';
|
||||
import 'package:sefer_driver/main.dart';
|
||||
import 'package:sefer_driver/views/auth/captin/login_captin.dart';
|
||||
import 'package:sefer_driver/views/home/Captin/driver_map_page.dart';
|
||||
import 'package:sefer_driver/views/home/Captin/orderCaptin/vip_order_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:sefer_driver/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:sefer_driver/views/home/my_wallet/points_captain.dart';
|
||||
import 'package:sefer_driver/views/widgets/mydialoug.dart';
|
||||
|
||||
import '../../../../../constant/colors.dart';
|
||||
import '../../../../../constant/links.dart';
|
||||
import '../../../../../controller/auth/google_sign.dart';
|
||||
import '../../../../../controller/firebase/firbase_messge.dart';
|
||||
import '../../../../../controller/functions/crud.dart';
|
||||
import '../../../../../controller/home/captin/order_request_controller.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../auth/captin/otp_page.dart';
|
||||
import '../../../my_wallet/ecash.dart';
|
||||
import '../../../../auth/syria/registration_view.dart';
|
||||
|
||||
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
final firebaseMessagesController =
|
||||
@@ -150,35 +146,28 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
// height: 5,
|
||||
// ),
|
||||
|
||||
// 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 {
|
||||
// Get.to(PhoneNumberScreen());
|
||||
// // payWithEcashDriver(context, '2000');
|
||||
// // payWithMTNWallet(context, '1', 'SYP');
|
||||
// // firebaseMessagesController.sendNotificationToDriverMAP(
|
||||
// // 'title',
|
||||
// // DateTime.now().toString(),
|
||||
// // 'ffX7xVXpdE_Xq8JBH3lgS4:APA91bGBHp53E-ZuXdlLBpRZohzqR9sazqcn3pwpEDG7JxkVi9MBtFDlCipzLpPCvD6LHEtds88ugGyCty7pEJVyx6tQYvzHVDCh7l3_7axpyriTBs5iv9E',
|
||||
// // [],
|
||||
// // '');
|
||||
// // box.write(BoxName.statusDriverLocation, 'off');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ),f
|
||||
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 {
|
||||
Get.to(() => const RegistrationView());
|
||||
|
||||
// box.write(BoxName.statusDriverLocation, 'off');
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome5.grin_tears,
|
||||
size: 29,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
|
||||
@@ -1,310 +1,3 @@
|
||||
// import 'dart:io';
|
||||
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:get/get.dart';
|
||||
// import 'package:slide_to_act/slide_to_act.dart';
|
||||
// import 'package:vibration/vibration.dart';
|
||||
|
||||
// import '../../../../constant/colors.dart';
|
||||
// import '../../../../constant/style.dart';
|
||||
// import '../../../../controller/home/captin/map_driver_controller.dart';
|
||||
// import '../../../widgets/elevated_btn.dart';
|
||||
|
||||
// GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
// return GetBuilder<MapDriverController>(
|
||||
// builder: (mapDriverController) => mapDriverController.isRideStarted
|
||||
// ? Positioned(
|
||||
// left: 5,
|
||||
// top: 5,
|
||||
// right: 5,
|
||||
// child: Container(
|
||||
// decoration: AppStyle.boxDecoration1.copyWith(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: Colors.black.withOpacity(0.1),
|
||||
// blurRadius: 10,
|
||||
// offset: Offset(0, 5),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// padding: const EdgeInsets.all(10),
|
||||
// height: mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
// ? mapDriverController.driverEndPage = 190
|
||||
// : mapDriverController.carType == 'Mishwar Vip'
|
||||
// ? 120
|
||||
// : 170,
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
// children: [
|
||||
// if (mapDriverController.carType != 'Mishwar Vip')
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// children: [
|
||||
// _buildInfoColumn(
|
||||
// icon: Icons.social_distance,
|
||||
// text: '${mapDriverController.distance} ${'KM'.tr}',
|
||||
// ),
|
||||
// _buildInfoColumn(
|
||||
// icon: Icons.timelapse,
|
||||
// text: mapDriverController.hours > 1
|
||||
// ? '${mapDriverController.hours} ${'H and'.tr} ${mapDriverController.minutes} m'
|
||||
// : '${mapDriverController.minutes} ${'m'.tr}',
|
||||
// ),
|
||||
// _buildInfoColumn(
|
||||
// icon: Icons.money_sharp,
|
||||
// text:
|
||||
// '${mapDriverController.paymentAmount} ${'\$'.tr}',
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// if (mapDriverController.carType != 'Speed' &&
|
||||
// mapDriverController.carType != 'Awfar Car' &&
|
||||
// mapDriverController.carType != 'Scooter')
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
// children: [
|
||||
// _buildInfoBox(
|
||||
// icon: Icons.timer,
|
||||
// text:
|
||||
// mapDriverController.stringRemainingTimeRideBegin1,
|
||||
// ),
|
||||
// _buildInfoBox(
|
||||
// icon: Icons.location_on,
|
||||
// text:
|
||||
// '${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}',
|
||||
// ),
|
||||
// _buildInfoBox(
|
||||
// icon: Icons.attach_money,
|
||||
// text: mapDriverController.price.toStringAsFixed(2),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// _builtTimerAndCarType(),
|
||||
// Container(
|
||||
// width: Get.width * 0.8,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(15),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: AppColor.redColor.withOpacity(0.3),
|
||||
// blurRadius: 8,
|
||||
// offset: Offset(0, 4),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// child: SlideAction(
|
||||
// height: 50,
|
||||
// borderRadius: 15,
|
||||
// elevation: 4,
|
||||
// text: 'Slide to End Trip'.tr,
|
||||
// textStyle: AppStyle.title.copyWith(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// outerColor: AppColor.redColor,
|
||||
// innerColor: Colors.white,
|
||||
// sliderButtonIcon: const Icon(
|
||||
// Icons.arrow_forward_ios,
|
||||
// color: AppColor.redColor,
|
||||
// size: 24,
|
||||
// ),
|
||||
// sliderRotate: false,
|
||||
// onSubmit: () {
|
||||
// HapticFeedback.mediumImpact();
|
||||
// mapDriverController.finishRideFromDriver();
|
||||
// },
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : const SizedBox(),
|
||||
// );
|
||||
// }
|
||||
|
||||
// class _builtTimerAndCarType extends StatelessWidget {
|
||||
// const _builtTimerAndCarType({
|
||||
// super.key,
|
||||
// });
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// final mapDriverController = Get.find<MapDriverController>();
|
||||
// return Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
// children: [
|
||||
// Container(
|
||||
// decoration: AppStyle.boxDecoration1.copyWith(
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: AppColor.accentColor.withOpacity(0.2),
|
||||
// blurRadius: 8,
|
||||
// offset: Offset(0, 4),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
// child: Text(
|
||||
// mapDriverController.carType,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
// if (mapDriverController.carType != 'Comfort' &&
|
||||
// mapDriverController.carType != 'Mishwar Vip' &&
|
||||
// mapDriverController.carType != 'Lady')
|
||||
// Container(
|
||||
// width: Get.width * 0.6,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// gradient: LinearGradient(
|
||||
// colors: [
|
||||
// mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
// ? AppColor.redColor.withOpacity(0.8)
|
||||
// : AppColor.greenColor.withOpacity(0.8),
|
||||
// mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
// ? AppColor.redColor
|
||||
// : AppColor.greenColor,
|
||||
// ],
|
||||
// begin: Alignment.centerLeft,
|
||||
// end: Alignment.centerRight,
|
||||
// ),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: (mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
// ? AppColor.redColor
|
||||
// : AppColor.greenColor)
|
||||
// .withOpacity(0.3),
|
||||
// blurRadius: 8,
|
||||
// offset: Offset(0, 4),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// child: ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(12),
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// LinearProgressIndicator(
|
||||
// backgroundColor: Colors.white.withOpacity(0.2),
|
||||
// valueColor: AlwaysStoppedAnimation<Color>(
|
||||
// Colors.white.withOpacity(0.5),
|
||||
// ),
|
||||
// minHeight: 40,
|
||||
// value:
|
||||
// mapDriverController.progressTimerRideBegin.toDouble(),
|
||||
// ),
|
||||
// Center(
|
||||
// child: AnimatedDefaultTextStyle(
|
||||
// duration: Duration(milliseconds: 300),
|
||||
// style: AppStyle.title.copyWith(
|
||||
// color: Colors.white,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// fontSize:
|
||||
// mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
// ? 18
|
||||
// : 16,
|
||||
// shadows: [
|
||||
// Shadow(
|
||||
// color: Colors.black26,
|
||||
// offset: Offset(0, 2),
|
||||
// blurRadius: 4,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// child: Text(
|
||||
// mapDriverController.stringRemainingTimeRideBegin,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
// Widget _buildInfoColumn({required IconData icon, required String text}) {
|
||||
// return Column(
|
||||
// children: [
|
||||
// Icon(icon),
|
||||
// Text(
|
||||
// text,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
|
||||
// Widget _buildInfoBox({required IconData icon, required String text}) {
|
||||
// return Container(
|
||||
// width: Get.width * .2,
|
||||
// decoration: AppStyle.boxDecoration1,
|
||||
// padding: const EdgeInsets.all(4),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Icon(icon),
|
||||
// SizedBox(width: 4),
|
||||
// Text(
|
||||
// text,
|
||||
// style: AppStyle.number,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
|
||||
// GetBuilder<MapDriverController> speedCircle() {
|
||||
// if (Get.find<MapDriverController>().speed > 100) {
|
||||
// if (Platform.isIOS) {
|
||||
// HapticFeedback.selectionClick();
|
||||
// } else {
|
||||
// Vibration.vibrate(duration: 1000);
|
||||
// }
|
||||
// Get.defaultDialog(
|
||||
// barrierDismissible: false,
|
||||
// titleStyle: AppStyle.title,
|
||||
// title: 'Speed Over'.tr,
|
||||
// middleText: 'Please slow down'.tr,
|
||||
// middleTextStyle: AppStyle.title,
|
||||
// confirm: MyElevatedButton(
|
||||
// title: 'I will slow down'.tr,
|
||||
// onPressed: () => Get.back(),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// return GetBuilder<MapDriverController>(
|
||||
// builder: (mapDriverController) {
|
||||
// return mapDriverController.isRideStarted
|
||||
// ? Positioned(
|
||||
// bottom: 25,
|
||||
// right: 100,
|
||||
// child: Container(
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: mapDriverController.speed > 100
|
||||
// ? Colors.red
|
||||
// : AppColor.secondaryColor,
|
||||
// border: Border.all(width: 3, color: AppColor.redColor),
|
||||
// ),
|
||||
// height: 60,
|
||||
// width: 60,
|
||||
// child: Center(
|
||||
// child: Text(
|
||||
// mapDriverController.speed.toStringAsFixed(0),
|
||||
// style: AppStyle.number,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : const SizedBox();
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -355,7 +48,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
),
|
||||
_buildInfoColumn(
|
||||
icon: Icons.money_sharp,
|
||||
text: '${controller.paymentAmount} ${'\$'.tr}',
|
||||
text: '${controller.paymentAmount} ${'SYP'.tr}',
|
||||
label: 'Price'.tr,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -194,11 +194,10 @@ class GoogleDriverMap extends StatelessWidget {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: locationController.myLocation,
|
||||
draggable: false, // Changed: لا يمكن سحب ماركر السائق
|
||||
icon: controller.carIcon,
|
||||
rotation: locationController.heading,
|
||||
anchor: const Offset(
|
||||
0.5, 0.5), // New: وضع نقطة ارتكاز الأيقونة في المنتصف
|
||||
flat: true,
|
||||
anchor: const Offset(0.5, 0.5),
|
||||
icon: controller.carIcon,
|
||||
),
|
||||
Marker(
|
||||
markerId: MarkerId('start'.tr),
|
||||
|
||||
Reference in New Issue
Block a user