5/2/passnew
This commit is contained in:
@@ -1,119 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
|
||||
class BottomBarController extends GetxController {
|
||||
var currentIndex = 0.obs;
|
||||
|
||||
void changePage(int index) {
|
||||
currentIndex.value = index;
|
||||
}
|
||||
}
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
final BottomBarController controller = Get.put(BottomBarController());
|
||||
|
||||
HomeScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Bottom Bar Example'.tr),
|
||||
),
|
||||
body: Obx(() => IndexedStack(
|
||||
index: controller.currentIndex.value,
|
||||
children: const [
|
||||
HomeView(),
|
||||
ProfileView(),
|
||||
StatisticsView(),
|
||||
WalletView(),
|
||||
],
|
||||
)),
|
||||
bottomNavigationBar: Obx(() => BottomNavigationBar(
|
||||
backgroundColor: Colors.greenAccent,
|
||||
currentIndex: controller.currentIndex.value,
|
||||
onTap: controller.changePage,
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(
|
||||
Icons.home,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Home'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(
|
||||
Icons.person,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Profile'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(
|
||||
Icons.bar_chart,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Statistics'.tr,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: const Icon(
|
||||
Icons.account_balance_wallet,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
label: 'Wallet'.tr,
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class HomeView extends StatelessWidget {
|
||||
const HomeView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map<String, dynamic> data;
|
||||
return const Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Home View'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ProfileView extends StatelessWidget {
|
||||
const ProfileView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text('Profile View'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class StatisticsView extends StatelessWidget {
|
||||
const StatisticsView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text('Statistics View'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class WalletView extends StatelessWidget {
|
||||
const WalletView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text('Wallet View'),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,305 +0,0 @@
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/functions/camer_controller.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
class CameraWidgetCardId extends StatelessWidget {
|
||||
final CameraClassController cameraClassController =
|
||||
Get.put(CameraClassController());
|
||||
|
||||
CameraWidgetCardId({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: 'Scan Id'.tr,
|
||||
body: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
|
||||
child: GetBuilder<CameraClassController>(
|
||||
builder: (cameraClassController) =>
|
||||
cameraClassController.isCameraInitialized
|
||||
? Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.fitWidth,
|
||||
child: SizedBox(
|
||||
width: Get.width * .9,
|
||||
height: Get.width *
|
||||
.9, // Set the desired aspect ratio here
|
||||
child: CameraPreview(
|
||||
cameraClassController.cameraController,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 72,
|
||||
child: Container(
|
||||
width: 230,
|
||||
height: 25,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.yellowColor,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 60,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 230,
|
||||
height: 25,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 156,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 175,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 191,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 207,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 225,
|
||||
right: 5,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 15,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 115,
|
||||
left: 25,
|
||||
child: Container(
|
||||
width: 120,
|
||||
height: 110,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: Get.width * 3 / 4,
|
||||
width: Get.width,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Camera not initilaized yet'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID MklGoogle'.tr,
|
||||
onPressed: () =>
|
||||
cameraClassController.takePictureAndMLGoogleScan()),
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID Tesseract'.tr, onPressed: () {}),
|
||||
],
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID Api'.tr,
|
||||
onPressed: () => cameraClassController.extractCardId()),
|
||||
GetBuilder<CameraClassController>(
|
||||
builder: (cameraClassController) => Expanded(
|
||||
child:
|
||||
Text(cameraClassController.scannedText.toString())))
|
||||
],
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
|
||||
class CameraWidgetPassPort extends StatelessWidget {
|
||||
final CameraClassController cameraClassController =
|
||||
Get.put(CameraClassController());
|
||||
|
||||
CameraWidgetPassPort({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: 'Scan Id'.tr,
|
||||
body: [
|
||||
Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
|
||||
child: GetBuilder<CameraClassController>(
|
||||
builder: (cameraClassController) =>
|
||||
cameraClassController.isCameraInitialized
|
||||
? Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.fitWidth,
|
||||
child: SizedBox(
|
||||
width: Get.width * .9,
|
||||
height: Get.width *
|
||||
.9, // Set the desired aspect ratio here
|
||||
child: CameraPreview(
|
||||
cameraClassController.cameraController,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 35,
|
||||
left: 35,
|
||||
width: Get.width * .77,
|
||||
height:
|
||||
17, //left":95.0,"top":134.0,"width":2909.0,"height":175.0
|
||||
child: Container(
|
||||
// width: 230,
|
||||
// height: 25,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.yellowColor,
|
||||
width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 60,
|
||||
right: 25,
|
||||
width: 90,
|
||||
height: 25,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 110,
|
||||
right: 90,
|
||||
child: Container(
|
||||
width: 140,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
// color: AppColor.blueColor,
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: Get.width * 3 / 4,
|
||||
width: Get.width,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Camera not initilaized yet',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID MklGoogle'.tr,
|
||||
onPressed: () =>
|
||||
cameraClassController.takePictureAndMLGoogleScan()),
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID Tesseract'.tr, onPressed: () {}),
|
||||
],
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Scan ID Api'.tr,
|
||||
onPressed: () => cameraClassController.extractCardId()),
|
||||
GetBuilder<CameraClassController>(
|
||||
builder: (cameraClassController) => Expanded(
|
||||
child:
|
||||
Text(cameraClassController.scannedText.toString())))
|
||||
],
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../../controller/functions/location_controller.dart';
|
||||
import '../../Rate/rate_passenger.dart';
|
||||
import 'mapDriverWidgets/driver_end_ride_bar.dart';
|
||||
import 'mapDriverWidgets/google_driver_map_page.dart';
|
||||
import 'mapDriverWidgets/google_map_app.dart';
|
||||
import 'mapDriverWidgets/passenger_info_window.dart';
|
||||
import 'mapDriverWidgets/sos_connect.dart';
|
||||
|
||||
class PassengerLocationMapPage extends StatelessWidget {
|
||||
PassengerLocationMapPage({super.key});
|
||||
final LocationController locationController = Get.put(LocationController());
|
||||
final MapDriverController mapDriverController =
|
||||
Get.put(MapDriverController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Get.put(MapDriverController());
|
||||
|
||||
return MyScafolld(
|
||||
title: 'Map Passenger'.tr,
|
||||
body: [
|
||||
GoogleDriverMap(locationController: locationController),
|
||||
const PassengerInfoWindow(),
|
||||
driverEndRideBar(),
|
||||
const SosConnect(),
|
||||
speedCircle(),
|
||||
const GoogleMapApp(),
|
||||
PricesWindow(),
|
||||
],
|
||||
isleading: false);
|
||||
}
|
||||
}
|
||||
|
||||
class PricesWindow extends StatelessWidget {
|
||||
const PricesWindow({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapDriverController>(builder: (mapDriverController) {
|
||||
return mapDriverController.isPriceWindow
|
||||
? Positioned(
|
||||
bottom: Get.height * 1.2,
|
||||
// top: Get.height * 3,
|
||||
left: Get.height * 1,
|
||||
right: Get.height * 1,
|
||||
child: Container(
|
||||
height: Get.height * 3,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: Text(
|
||||
'Total Price is '.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'ok'.tr,
|
||||
onPressed: () =>
|
||||
Get.to(() => RatePassenger(), arguments: {
|
||||
'rideId': mapDriverController.rideId,
|
||||
'passengerId': mapDriverController.passengerId,
|
||||
'driverId': mapDriverController.driverId
|
||||
}))
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/auth/captin/history_captain.dart';
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
import '../../../widgets/my_scafold.dart';
|
||||
import '../../../widgets/mycircular.dart';
|
||||
|
||||
class HistoryCaptain extends StatelessWidget {
|
||||
const HistoryCaptain({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(HistoryCaptainController());
|
||||
return MyScafolld(
|
||||
title: 'History Page'.tr,
|
||||
body: [
|
||||
GetBuilder<HistoryCaptainController>(
|
||||
builder: (historyCaptainController) => historyCaptainController
|
||||
.isloading
|
||||
? const MyCircularProgressIndicator()
|
||||
: historyCaptainController.historyData['message'].length < 1
|
||||
? Center(
|
||||
child: Text(
|
||||
'No ride Yet.'.tr,
|
||||
style: AppStyle.headTitle,
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: historyCaptainController
|
||||
.historyData['message'].length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var list = historyCaptainController
|
||||
.historyData['message'][index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
list['status'] != 'Cancel'
|
||||
? historyCaptainController
|
||||
.getHistoryDetails(list['order_id'])
|
||||
: Get.defaultDialog(
|
||||
title: 'This Trip Cancelled'.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () => Get.back()));
|
||||
},
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'OrderId'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['order_id'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'created time'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
list['created_at'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
list['status'],
|
||||
style: list['status'] == 'Apply'
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.greenColor)
|
||||
: list['status'] == 'Refused'
|
||||
? AppStyle.title.copyWith(
|
||||
color: AppColor.redColor)
|
||||
: AppStyle.title.copyWith(
|
||||
color: AppColor.yellowColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
))
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,205 +0,0 @@
|
||||
import 'package:SEFER/controller/functions/location_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/auth/captin/history_captain.dart';
|
||||
import 'package:SEFER/controller/functions/launch.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
|
||||
import '../../../widgets/mycircular.dart';
|
||||
|
||||
class HistoryDetailsPage extends StatelessWidget {
|
||||
HistoryDetailsPage({super.key});
|
||||
HistoryCaptainController historyCaptainController =
|
||||
Get.put(HistoryCaptainController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: 'Trip Detail'.tr,
|
||||
body: [
|
||||
GetBuilder<HistoryCaptainController>(
|
||||
builder: (historyCaptainController) {
|
||||
var res = historyCaptainController.historyDetailsData['data'];
|
||||
return historyCaptainController.isloading
|
||||
? const MyCircularProgressIndicator()
|
||||
: SingleChildScrollView(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.blueColor, width: 2)),
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${res['start_location']}/${res['end_location']}/';
|
||||
print(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: Get.height * .2,
|
||||
width: Get.width * .75,
|
||||
child: GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: Get.find<LocationController>()
|
||||
.myLocation, // Assuming passenger location is available
|
||||
tilt: 80, zoom: 13,
|
||||
),
|
||||
zoomControlsEnabled: true,
|
||||
// liteModeEnabled: true,
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route'),
|
||||
points: [
|
||||
LatLng(
|
||||
double.parse(res['start_location']
|
||||
.toString()
|
||||
.split(',')[0]),
|
||||
double.parse(res['start_location']
|
||||
.toString()
|
||||
.split(',')[1]),
|
||||
),
|
||||
LatLng(
|
||||
double.parse(res['end_location']
|
||||
.toString()
|
||||
.split(',')[0]),
|
||||
double.parse(res['end_location']
|
||||
.toString()
|
||||
.split(',')[1]),
|
||||
)
|
||||
],
|
||||
color: AppColor.primaryColor,
|
||||
width: 5,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(
|
||||
'${'Order ID'.tr} ${res['id']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
res['date'].toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.greenColor, width: 2)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(
|
||||
'${'Price is'.tr} ${res['price_for_driver']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Distance is'.tr} ${res['distance']} KM',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Text(
|
||||
'Times of Trip'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.redColor, width: 2)),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Time to Passenger is'.tr} ${res['DriverIsGoingToPassenger']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'TimeStart is'.tr} ${res['rideTimeStart']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Time Finish is'.tr} ${res['rideTimeFinish']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.greenColor, width: 2)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'${'Passenger Name is'.tr} ${res['first_name']} ${res['last_name']} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.yellowColor, width: 2)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'${'Status is'.tr} ${res['status']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
})
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
import 'package:SEFER/constant/api_key.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:SEFER/views/notification/available_rides_page.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/auth/captin/logout_captain.dart';
|
||||
import 'package:SEFER/views/home/Captin/history/history_captain.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/help_captain.dart';
|
||||
import 'package:SEFER/views/home/Captin/settings_captain.dart';
|
||||
import 'package:SEFER/views/home/my_wallet/walet_captain.dart';
|
||||
import 'package:SEFER/views/home/profile/profile_captain.dart';
|
||||
import 'package:SEFER/views/notification/notification_captain.dart';
|
||||
|
||||
import '../../../../controller/functions/upload_image.dart';
|
||||
|
||||
class DrawerCaptain extends StatelessWidget {
|
||||
ImageController imageController = Get.put(ImageController());
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String writeText(int times) {
|
||||
return '*' * times;
|
||||
}
|
||||
|
||||
return Drawer(
|
||||
child: ListView(
|
||||
children: [
|
||||
// Other drawer items
|
||||
UserAccountsDrawerHeader(
|
||||
decoration: const BoxDecoration(
|
||||
color: AppColor.greenColor,
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppColor.primaryColor,
|
||||
AppColor.secondaryColor,
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
),
|
||||
currentAccountPictureSize: const Size.square(100),
|
||||
arrowColor: AppColor.deepPurpleAccent,
|
||||
accountName: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const Spacer(),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
Get.find<HomeCaptainController>().rating.toString(),
|
||||
style: AppStyle.number.copyWith(color: Colors.amber),
|
||||
),
|
||||
Container(
|
||||
// width: Get.width * .4,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 4, vertical: 1),
|
||||
color: AppColor.greenColor,
|
||||
child: RatingBar.builder(
|
||||
initialRating: 5,
|
||||
minRating: 1,
|
||||
direction: Axis.horizontal,
|
||||
itemCount: 5,
|
||||
itemSize: 20,
|
||||
itemPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 2),
|
||||
itemBuilder: (context, _) => const Icon(
|
||||
Icons.star,
|
||||
color: Colors.amber,
|
||||
),
|
||||
onRatingUpdate: (rating) {}),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
accountEmail: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Text(
|
||||
box.read(BoxName.emailDriver),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
currentAccountPicture: Stack(
|
||||
children: [
|
||||
GetBuilder<ImageController>(builder: (imageController) {
|
||||
return imageController.isloading
|
||||
? const MyCircularProgressIndicator()
|
||||
: CircleAvatar(
|
||||
radius: 45,
|
||||
backgroundImage: NetworkImage(
|
||||
'${AK.serverPHP}/portrate_captain_image/${box.read(BoxName.driverID)}.jpg'),
|
||||
);
|
||||
}),
|
||||
Positioned(
|
||||
right: 0,
|
||||
top: 0,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
imageController.choosImage(
|
||||
AppLink.uploadImage1, 'portrait');
|
||||
},
|
||||
icon: const Icon(Icons.edit),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.account_balance_wallet),
|
||||
title: Text(
|
||||
'Wallet'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle wallet item tap
|
||||
Get.to(() => WalletCaptain(), transition: Transition.native);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.person),
|
||||
title: Text(
|
||||
'Profile'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle profile item tap
|
||||
Get.to(() => const ProfileCaptain(),
|
||||
transition: Transition.rightToLeftWithFade);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
Icons.history,
|
||||
),
|
||||
title: Text(
|
||||
'History of Trip'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
Get.to(() => const HistoryCaptain(),
|
||||
transition: Transition.downToUp);
|
||||
// Handle history of trip item tap
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.phonelink_ring_rounded),
|
||||
title: Text(
|
||||
'Available for rides'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
Get.to(() => const AvailableRidesPage(),
|
||||
transition: Transition.rightToLeftWithFade);
|
||||
// Handle history of trip item tap
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.notifications),
|
||||
title: Text(
|
||||
'Notifications'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle notifications item tap
|
||||
Get.to(() => const NotificationCaptain(),
|
||||
transition: Transition.upToDown);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.help),
|
||||
title: Text(
|
||||
'Helping Center'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle helping center item tap
|
||||
Get.to(() => HelpCaptain(), transition: Transition.size);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings),
|
||||
title: Text(
|
||||
'Settings'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle settings item tap
|
||||
Get.to(() => const SettingsCaptain(),
|
||||
transition: Transition.cupertino);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.exit_to_app),
|
||||
title: Text(
|
||||
'Sign Out'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () {
|
||||
// Handle sign out item tap
|
||||
Get.to(() => const LogoutCaptain(),
|
||||
transition: Transition.cupertinoDialog);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
import 'dart:async';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
||||
import 'package:agora_rtc_engine/agora_rtc_engine.dart';
|
||||
|
||||
import '../../../../constant/api_key.dart';
|
||||
import '../../../../controller/functions/crud.dart';
|
||||
|
||||
String appId = AK.agoraAppId;
|
||||
|
||||
class DriverCallPage extends StatefulWidget {
|
||||
const DriverCallPage({super.key});
|
||||
|
||||
@override
|
||||
State<DriverCallPage> createState() => _DriverCallPageState();
|
||||
}
|
||||
|
||||
class _DriverCallPageState extends State<DriverCallPage> {
|
||||
String channelName = '';
|
||||
String token = '';
|
||||
// "00612994c6e707543e68d5638894d04f989IAAlydoFEC3ZeZkeUwl0dSswZTX8n+xyZR8PBWdwXFV6t6MLiA8AAAAAEACCHD/gn3TUZQEAAQAAAAAA";
|
||||
|
||||
// int uid = int.parse(box.read(BoxName.phoneDriver)); // uid of the local user
|
||||
int uid = 0;
|
||||
int? _remoteUid; // uid of the remote user
|
||||
bool _isJoined = false; // Indicates if the local user has joined the channel
|
||||
late RtcEngine agoraEngine; // Agora engine instance
|
||||
|
||||
final GlobalKey<ScaffoldMessengerState> scaffoldMessengerKey =
|
||||
GlobalKey<ScaffoldMessengerState>(); // Global key to access the scaffold
|
||||
|
||||
showMessage(String message) {
|
||||
scaffoldMessengerKey.currentState?.showSnackBar(SnackBar(
|
||||
content: Text(message),
|
||||
));
|
||||
}
|
||||
|
||||
initAgora() async {
|
||||
await fetchToken();
|
||||
await setupVoiceSDKEngine();
|
||||
}
|
||||
|
||||
fetchToken() async {
|
||||
var res = await CRUD()
|
||||
.getAgoraToken(channelName: channelName, uid: uid.toString());
|
||||
setState(() {
|
||||
token = res;
|
||||
print('token is $token');
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_remoteUid = box.read(BoxName.phone) != null
|
||||
? int.parse(box.read(BoxName.phone))
|
||||
: int.parse(box.read(BoxName.phoneDriver));
|
||||
uid = box.read(BoxName.phoneDriver) != null
|
||||
? int.parse(box.read(BoxName.phoneDriver))
|
||||
: int.parse(box.read(BoxName.phone));
|
||||
print('remoteid is $_remoteUid');
|
||||
print('uid is $uid');
|
||||
// Set up an instance of Agora engine
|
||||
initAgora();
|
||||
}
|
||||
|
||||
Future<void> setupVoiceSDKEngine() async {
|
||||
// retrieve or request microphone permission
|
||||
await [Permission.microphone].request();
|
||||
|
||||
//create an instance of the Agora engine
|
||||
agoraEngine = createAgoraRtcEngine();
|
||||
await agoraEngine.initialize(RtcEngineContext(appId: AK.agoraAppId));
|
||||
print('eeeeeeeeeeeeeeeeeeee');
|
||||
print(agoraEngine);
|
||||
// Register the event handler
|
||||
agoraEngine.registerEventHandler(
|
||||
RtcEngineEventHandler(
|
||||
onJoinChannelSuccess: (RtcConnection connection, int elapsed) {
|
||||
showMessage(
|
||||
"Local user uid:${connection.localUid} joined the channel");
|
||||
setState(() {
|
||||
_isJoined = true;
|
||||
});
|
||||
},
|
||||
onUserJoined: (RtcConnection connection, int remoteUid, int elapsed) {
|
||||
showMessage("Remote user uid:$remoteUid joined the channel");
|
||||
setState(() {
|
||||
_remoteUid = remoteUid;
|
||||
});
|
||||
},
|
||||
onUserOffline: (RtcConnection connection, int remoteUid,
|
||||
UserOfflineReasonType reason) {
|
||||
showMessage("Remote user uid:$remoteUid left the channel");
|
||||
setState(() {
|
||||
_remoteUid = null;
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void join() async {
|
||||
// Set channel options including the client role and channel profile
|
||||
ChannelMediaOptions options = const ChannelMediaOptions(
|
||||
clientRoleType: ClientRoleType.clientRoleBroadcaster,
|
||||
channelProfile: ChannelProfileType.channelProfileCommunication,
|
||||
);
|
||||
|
||||
await agoraEngine.joinChannel(
|
||||
token: token,
|
||||
channelId: channelName,
|
||||
options: options,
|
||||
uid: uid,
|
||||
);
|
||||
}
|
||||
//https://console.agora.io/invite?sign=5e9e22d06f22caeeada9954c9e908572%253A5ba8aed978a35eab5a5113742502ded2a41478b2a81cb19c71a30776e125b58a
|
||||
|
||||
void leave() {
|
||||
setState(() {
|
||||
_isJoined = false;
|
||||
_remoteUid = null;
|
||||
});
|
||||
agoraEngine.leaveChannel();
|
||||
}
|
||||
|
||||
// Clean up the resources when you leave
|
||||
@override
|
||||
void dispose() async {
|
||||
await agoraEngine.leaveChannel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// Build UI
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
scaffoldMessengerKey: scaffoldMessengerKey,
|
||||
home: MyScafolld(
|
||||
// appBar: AppBar(
|
||||
// title: const Text('Get started with Voice Calling'),
|
||||
// ),
|
||||
title: 'Voice Calling'.tr,
|
||||
isleading: true,
|
||||
body: [
|
||||
ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||
children: [
|
||||
// Status text
|
||||
Container(height: 40, child: Center(child: _status())),
|
||||
// Button Row
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
child: const Text("Join"),
|
||||
onPressed: () => {join()},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
child: const Text("Leave"),
|
||||
onPressed: () => {leave()},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _status() {
|
||||
String statusText;
|
||||
|
||||
if (!_isJoined)
|
||||
statusText = 'Join a channel';
|
||||
else if (_remoteUid == null)
|
||||
statusText = 'Waiting for a remote user to join...';
|
||||
else
|
||||
statusText = 'Connected to remote user, uid:$_remoteUid';
|
||||
|
||||
return Text(
|
||||
statusText,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/captin/help/help_controller.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/help_details_replay_page.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
import '../../../widgets/mycircular.dart';
|
||||
|
||||
class HelpCaptain extends StatelessWidget {
|
||||
HelpCaptain({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(HelpController());
|
||||
return MyScafolld(
|
||||
title: 'Helping Page'.tr,
|
||||
body: [
|
||||
Column(
|
||||
children: [
|
||||
Card(
|
||||
color: AppColor.yellowColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
'If you need any help or have question this is right site to do that and your welcome'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
Card(
|
||||
elevation: 3,
|
||||
color: AppColor.secondaryColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GetBuilder<HelpController>(
|
||||
builder: (helpController) => Form(
|
||||
key: helpController.formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: Get.width * .8,
|
||||
child: TextFormField(
|
||||
controller:
|
||||
helpController.helpQuestionController,
|
||||
decoration: InputDecoration(
|
||||
border: const OutlineInputBorder(),
|
||||
hintText: 'Enter your Question here'.tr,
|
||||
labelText: 'Question'.tr,
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter your Question.'.tr;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
helpController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: MyElevatedButton(
|
||||
onPressed: () {
|
||||
if (helpController.formKey.currentState!
|
||||
.validate()) {
|
||||
helpController.addHelpQuestion();
|
||||
|
||||
// Clear the feedback form
|
||||
helpController.formKey.currentState!
|
||||
.reset();
|
||||
}
|
||||
},
|
||||
title: 'Submit Question'.tr,
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
)),
|
||||
GetBuilder<HelpController>(
|
||||
builder: (helpController) => Container(
|
||||
height: 400,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: ListView.builder(
|
||||
itemCount: helpController.helpQuestionDate['message'] !=
|
||||
null
|
||||
? helpController.helpQuestionDate['message'].length
|
||||
: 0,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
// if (helpController.helpQuestionDate['message'] ==
|
||||
// null) {
|
||||
// return const CircularProgressIndicator();
|
||||
// }
|
||||
var list =
|
||||
helpController.helpQuestionDate['message'][index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: AppColor.greenColor,
|
||||
width: 3,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(11)),
|
||||
// elevation: 3,
|
||||
// color: AppColor.greenColor,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
print(list['id']);
|
||||
helpController.getindex(
|
||||
list['id'], list['helpQuestion']);
|
||||
helpController
|
||||
.getHelpRepley(list['id'].toString());
|
||||
Get.to(
|
||||
() => const HelpDetailsReplayPage(),
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: Get.width * .6,
|
||||
child: Text(
|
||||
list['helpQuestion'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: Get.width * .3,
|
||||
child: Text(
|
||||
list['datecreated'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../../controller/home/captin/help/help_controller.dart';
|
||||
import '../../../widgets/my_scafold.dart';
|
||||
|
||||
class HelpDetailsReplayPage extends StatelessWidget {
|
||||
const HelpDetailsReplayPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.find<HelpController>();
|
||||
return GetBuilder<HelpController>(
|
||||
builder: (helpController) => MyScafolld(
|
||||
title: 'Help Details'.tr,
|
||||
body: [
|
||||
helpController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Card(
|
||||
elevation: 3,
|
||||
child: Container(
|
||||
width: Get.width * .66,
|
||||
color: Colors.transparent,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
helpController.qustion,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Card(
|
||||
elevation: 3,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
width: Get.width * .66,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: helpController.status ==
|
||||
'not yet' ||
|
||||
helpController
|
||||
.helpQuestionRepleyDate[
|
||||
'message']['replay']
|
||||
.toString() ==
|
||||
'not yet'
|
||||
? Text(
|
||||
'No Response yet.'.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text(
|
||||
helpController
|
||||
.helpQuestionRepleyDate[
|
||||
'message']['replay']
|
||||
.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
],
|
||||
)
|
||||
],
|
||||
isleading: true,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -1,298 +0,0 @@
|
||||
import 'package:SEFER/controller/payment/paymob.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/drawer_captain.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/info.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../constant/table_names.dart';
|
||||
import '../../../../controller/functions/location_controller.dart';
|
||||
import '../../../../controller/home/captin/home_captain_controller.dart';
|
||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||
import 'widget/connect.dart';
|
||||
import 'widget/left_menu_map_captain.dart';
|
||||
import '../../../../controller/home/payment/captain_wallet_controller.dart';
|
||||
import '../../../../main.dart';
|
||||
import '../../../widgets/circle_container.dart';
|
||||
|
||||
class HomeCaptain extends StatelessWidget {
|
||||
HomeCaptain({super.key});
|
||||
final LocationController locationController = Get.put(LocationController());
|
||||
final HomeCaptainController homeCaptainController =
|
||||
Get.put(HomeCaptainController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(OrderRequestController());
|
||||
Get.put(HomeCaptainController());
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColor.greenColor,
|
||||
elevation: 0,
|
||||
title: Text('Home'.tr),
|
||||
actions: [
|
||||
GetBuilder<LocationController>(
|
||||
builder: (locationController) => locationController.isLoading
|
||||
? const SizedBox(
|
||||
height: 1,
|
||||
width: 1,
|
||||
child: CircularProgressIndicator.adaptive())
|
||||
: const SizedBox(),
|
||||
),
|
||||
IconButton(
|
||||
// onPressed: () => box.remove(BoxName.periods),
|
||||
onPressed: () => sql.deleteAllData(TableName.driverOrdersRefuse),
|
||||
icon: const Icon(Icons.remove)),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (orderRequestController) => IconButton(
|
||||
onPressed: () =>
|
||||
orderRequestController.getRefusedOrderByCaptain(),
|
||||
icon: const Icon(Icons.get_app)),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
PaymobManager().getPaymentKey(100, 'EGP');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.call,
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
drawer: DrawerCaptain(),
|
||||
body: Stack(
|
||||
children: [
|
||||
GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: GoogleMap(
|
||||
onMapCreated: controller.onMapCreated,
|
||||
// cameraTargetBounds: CameraTargetBounds(controller.boundsdata),
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: locationController.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
|
||||
mapType:
|
||||
controller.mapType ? MapType.satellite : MapType.normal,
|
||||
myLocationButtonEnabled: true,
|
||||
// liteModeEnabled: true, tiltGesturesEnabled: false,
|
||||
|
||||
// indoorViewEnabled: true,
|
||||
trafficEnabled: controller.mapTrafficON,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
|
||||
myLocationEnabled: true,
|
||||
// liteModeEnabled: true,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 10,
|
||||
right: Get.width * .1,
|
||||
left: Get.width * .1,
|
||||
child: const ConnectWidget()),
|
||||
Positioned(
|
||||
top: 5,
|
||||
right: Get.width * .05,
|
||||
left: Get.width * .05,
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) => Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
width: Get.width * .8,
|
||||
height: 104,
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
' You Earn today is '.tr +
|
||||
homeCaptainController.totalMoneyToday,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Entypo.wallet,
|
||||
color: AppColor.yellowColor,
|
||||
),
|
||||
Text(
|
||||
'${' You Have in'.tr} ${AppInformation.appName} is ${homeCaptainController.totalMoneyInSEFER} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'Total points is '.tr +
|
||||
Get.find<CaptainWalletController>().totalPoints,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
color: int.parse(Get.find<HomeCaptainController>()
|
||||
.countRideToday) <
|
||||
5
|
||||
? AppColor.accentColor
|
||||
: int.parse(Get.find<HomeCaptainController>()
|
||||
.countRideToday) >
|
||||
5 &&
|
||||
int.parse(Get.find<
|
||||
HomeCaptainController>()
|
||||
.countRideToday) <
|
||||
10
|
||||
? AppColor.yellowColor
|
||||
: AppColor.greenColor,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8, vertical: 2),
|
||||
child: Text(
|
||||
'Ride Today : '.tr +
|
||||
Get.find<HomeCaptainController>()
|
||||
.countRideToday,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.secondaryColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
))),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 65,
|
||||
right: Get.width * .1,
|
||||
left: Get.width * .1,
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) => Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'${'Active Duration:'.tr} ${homeCaptainController.stringActiveDuration} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Total Connection Duration:'.tr} ${homeCaptainController.totalDurationToday} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Positioned(
|
||||
// bottom: Get.height * .17,
|
||||
// right: Get.width * .01,
|
||||
// child: AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: Get.width * .12,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColor.secondaryColor,
|
||||
// border: Border.all(),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () async {
|
||||
// CRUD().sendEmail(AppLink.sendEmailToPassengerForTripDetails, {
|
||||
// 'startLocation': Get.find<MapDriverController>()
|
||||
// .passengerLocation
|
||||
// .toString(),
|
||||
// 'endLocation': Get.find<MapDriverController>()
|
||||
// .passengerDestination
|
||||
// .toString(),
|
||||
// 'name': Get.find<MapDriverController>().name.toString(),
|
||||
// 'timeOfTrip':
|
||||
// Get.find<MapDriverController>().timeOfOrder.toString(),
|
||||
// 'fee': Get.find<MapDriverController>()
|
||||
// .totalPassenger
|
||||
// .toString(),
|
||||
// 'duration':
|
||||
// Get.find<MapDriverController>().duration.toString(),
|
||||
// 'phone': Get.find<MapDriverController>().phone.toString(),
|
||||
// 'email': Get.find<MapDriverController>().email.toString(),
|
||||
// });
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// MaterialCommunityIcons.map_marker_radius,
|
||||
// size: 45,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
leftMainMenuCaptainIcons(),
|
||||
// callPage(),
|
||||
|
||||
// Positioned(
|
||||
// top: Get.height * .2,
|
||||
// // left: 20,
|
||||
// // right: 20,
|
||||
// bottom: Get.height * .4,
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// homeCaptainController.getCountRideToday();
|
||||
// },
|
||||
// icon: const Icon(Icons.call),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// class CameraContainer extends StatelessWidget {
|
||||
// TextMLGoogleRecognizerController controller =
|
||||
// Get.put(TextMLGoogleRecognizerController());
|
||||
|
||||
// CameraContainer({super.key});
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Stack(
|
||||
// children: [
|
||||
// // The camera preview
|
||||
// SizedBox(
|
||||
// height: Get.height * 0.3,
|
||||
// width: Get.width * 0.9,
|
||||
// child: CameraPreview(controller.imagePicker as CameraController),
|
||||
// ),
|
||||
|
||||
// // The lines on the side of the name and national number
|
||||
// const Positioned(
|
||||
// bottom: 0,
|
||||
// left: 0,
|
||||
// right: 0,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Text('Name'),
|
||||
// Text('National Number'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@@ -1,98 +0,0 @@
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
|
||||
import '../../../../../constant/box_name.dart';
|
||||
import '../../../../../controller/functions/call_controller.dart';
|
||||
import '../../../../../main.dart';
|
||||
|
||||
class CallPage extends StatelessWidget {
|
||||
const CallPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(title: 'Call Page', isleading: true, body: [callPage()]);
|
||||
}
|
||||
}
|
||||
|
||||
GetBuilder<HomeCaptainController> callPage() {
|
||||
CallController callController = Get.put(CallController());
|
||||
Get.put(MapDriverController());
|
||||
callController.initAgoraFull();
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => Positioned(
|
||||
top: Get.height * .2,
|
||||
child: Container(
|
||||
height: 100, width: Get.width,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// await callController.initAgoraFull();
|
||||
// callController.join();
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call Income',
|
||||
'You have call from driver ${box.read(BoxName.nameDriver)}',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[
|
||||
callController.token,
|
||||
callController.channelName,
|
||||
callController.uid.toString(),
|
||||
callController.remoteUid.toString(),
|
||||
],
|
||||
);
|
||||
callController.join();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.greenColor),
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(callController.status),
|
||||
Text(Get.find<MapDriverController>().passengerName.toString()),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call End'.tr,
|
||||
'Call End',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[],
|
||||
);
|
||||
callController.leave();
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.redColor),
|
||||
child: const Icon(
|
||||
Icons.phone_disabled_sharp,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
// ignore: prefer_const_constructors
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
||||
import 'package:SEFER/controller/functions/call_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
|
||||
class CallPageFromPassenger extends StatelessWidget {
|
||||
const CallPageFromPassenger({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: 'Call Page'.tr, isleading: true, body: [callPage()]);
|
||||
}
|
||||
}
|
||||
|
||||
GetBuilder<HomeCaptainController> callPage() {
|
||||
CallController callController = Get.put(CallController());
|
||||
// callController.initAgoraFull();
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
'No SIM card, no problem! Call your driver directly through our app. We use advanced technology to ensure your privacy.'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Container(
|
||||
height: 100, width: Get.width,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// await callController.initAgoraFull();
|
||||
// callController.join();
|
||||
// FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
// 'Call Income',
|
||||
// 'You have call from driver ${box.read(BoxName.nameDriver)}',
|
||||
// Get.find<MapDriverController>().tokenPassenger,
|
||||
// [
|
||||
// callController.token,
|
||||
// callController.channelName,
|
||||
// callController.uid.toString(),
|
||||
// callController.remoteUid.toString(),
|
||||
// ],
|
||||
// );
|
||||
callController.join();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.greenColor),
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(callController.status),
|
||||
Text(Get.find<MapPassengerController>()
|
||||
.driverName
|
||||
.toString()),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Call End',
|
||||
'Call End'.tr,
|
||||
Get.find<MapPassengerController>().driverToken,
|
||||
[],
|
||||
);
|
||||
callController.leave();
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.redColor),
|
||||
child: const Icon(
|
||||
Icons.phone_disabled_sharp,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
// ignore: prefer_const_constructors
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/payment/captain_wallet_controller.dart';
|
||||
|
||||
import '../../../../../constant/style.dart';
|
||||
import '../../../../widgets/elevated_btn.dart';
|
||||
import '../../../../../controller/home/captin/home_captain_controller.dart';
|
||||
import '../../../../../controller/home/captin/order_request_controller.dart';
|
||||
|
||||
class ConnectWidget extends StatelessWidget {
|
||||
const ConnectWidget({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final OrderRequestController orderRequestController =
|
||||
Get.put(OrderRequestController());
|
||||
CaptainWalletController captainWalletController =
|
||||
Get.put(CaptainWalletController());
|
||||
|
||||
captainWalletController.getCaptainWalletFromBuyPoints();
|
||||
return Center(
|
||||
child: GetBuilder<HomeCaptainController>(
|
||||
builder: (homeCaptainController) => int.parse(
|
||||
orderRequestController.countRefuse) >
|
||||
3 ||
|
||||
double.parse(captainWalletController.totalPoints) < -300
|
||||
? CupertinoButton(
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
// backgroundColor: CupertinoColors.destructiveRed,
|
||||
barrierDismissible: false,
|
||||
title: double.parse(captainWalletController.totalPoints) <
|
||||
-300
|
||||
? 'You dont have Points'.tr
|
||||
: 'You Are Stopped For this Day !'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
double.parse(
|
||||
captainWalletController.totalPoints) <
|
||||
-300
|
||||
? await Get.find<TextToSpeechController>()
|
||||
.speakText(
|
||||
'You must be recharge your Account'
|
||||
.tr)
|
||||
: await Get.find<TextToSpeechController>()
|
||||
.speakText(
|
||||
'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
|
||||
.tr);
|
||||
},
|
||||
icon: const Icon(Icons.headphones),
|
||||
),
|
||||
Text(
|
||||
double.parse(captainWalletController.totalPoints) <
|
||||
-300
|
||||
? 'You must be recharge your Account'.tr
|
||||
: 'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
confirm:
|
||||
double.parse(captainWalletController.totalPoints) <
|
||||
-300
|
||||
? MyElevatedButton(
|
||||
title: 'Recharge my Account'.tr,
|
||||
onPressed: () {
|
||||
homeCaptainController
|
||||
.goToWalletFromConnect();
|
||||
})
|
||||
: MyElevatedButton(
|
||||
title: 'Ok , See you Tomorrow'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
}));
|
||||
},
|
||||
color: CupertinoColors.destructiveRed,
|
||||
child: Text(
|
||||
'You are Stopped'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
: CupertinoButton(
|
||||
onPressed: homeCaptainController.onButtonSelected,
|
||||
color: homeCaptainController.isActive
|
||||
? CupertinoColors.activeGreen
|
||||
: CupertinoColors.inactiveGray,
|
||||
child: Text(homeCaptainController.isActive
|
||||
? 'Connected'.tr
|
||||
: 'Not Connected'.tr),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
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 '../../../../../constant/colors.dart';
|
||||
import '../../../../Rate/ride_calculate_driver.dart';
|
||||
import '../../../../../controller/functions/location_controller.dart';
|
||||
|
||||
GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => Positioned(
|
||||
bottom: Get.height * .17,
|
||||
left: 6,
|
||||
child: Column(
|
||||
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: () {
|
||||
// AudioController audio = Get.put(AudioController());
|
||||
// audio.startRecording();
|
||||
// AC credentials = AC();
|
||||
// String apiKey = '';
|
||||
// String convertedStringN = credentials.c(
|
||||
// credentials.c(credentials.c(apiKey, cs), cC), cn);
|
||||
// print('Converted v: $convertedStringN');
|
||||
//
|
||||
// String retrievedStringS = credentials.r(
|
||||
// credentials.r(credentials.r(convertedStringN, cn), cC),
|
||||
// cs);
|
||||
// print('Retrieved String: $retrievedStringS');
|
||||
// //
|
||||
// if (retrievedStringS == apiKey) {
|
||||
// print('same');
|
||||
// }
|
||||
// Get.to((OrderRequestPage()));
|
||||
// ZonesController mapDriverController =
|
||||
// Get.put(ZonesController());
|
||||
// mapDriverController.getJsonOfZones();
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome.map_signs,
|
||||
size: 24,
|
||||
color: Colors.black,
|
||||
)),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
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(
|
||||
height: 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(
|
||||
height: 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.mapHomeCaptainController
|
||||
.animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
Get.find<LocationController>().myLocation.latitude,
|
||||
Get.find<LocationController>().myLocation.longitude,
|
||||
)));
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.location_on,
|
||||
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: () {
|
||||
Get.to(() => RideCalculateDriver());
|
||||
},
|
||||
icon: const Icon(FontAwesome5.chart_bar),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
|
||||
class ZonesController extends GetxController {
|
||||
Map<String, List<LatLng>> generateZoneMap(
|
||||
LatLng southwest, LatLng southEast, LatLng northeast) {
|
||||
const double desiredZoneArea = 4; // in square kilometers
|
||||
|
||||
final double width = (southEast.longitude - southwest.longitude) * 100;
|
||||
final double height = (northeast.latitude - southEast.latitude) * 100;
|
||||
final double totalArea = width * height;
|
||||
print(width);
|
||||
print(height);
|
||||
|
||||
// final int numZones = (totalArea / desiredZoneArea).ceil();
|
||||
|
||||
final double zoneWidth = width / sqrt(desiredZoneArea);
|
||||
final double zoneHeight = height / sqrt(desiredZoneArea);
|
||||
final numRows =
|
||||
((northeast.latitude - southwest.latitude) / zoneHeight).ceil();
|
||||
final numCols =
|
||||
((southEast.longitude - southwest.longitude) / zoneWidth).ceil();
|
||||
print('zoneWidth = $zoneWidth');
|
||||
print('zoneHeight = $zoneHeight');
|
||||
List<String> zoneNames = [];
|
||||
List<LatLng> zoneCoordinates = [];
|
||||
|
||||
for (int row = 0; row < numRows; row++) {
|
||||
for (int col = 0; col < numCols; col++) {
|
||||
final double zoneSouthwestLat =
|
||||
southwest.latitude + (row * zoneHeight / 100);
|
||||
final double zoneSouthwestLng =
|
||||
southwest.longitude + (col * zoneWidth / 100);
|
||||
final double zoneNortheastLat = zoneSouthwestLat + zoneHeight / 100;
|
||||
final double zoneNortheastLng = zoneSouthwestLng + zoneWidth / 100;
|
||||
|
||||
LatLng zoneSouthwest = LatLng(zoneSouthwestLat, zoneSouthwestLng);
|
||||
LatLng zoneNortheast = LatLng(zoneNortheastLat, zoneNortheastLng);
|
||||
|
||||
String zoneName =
|
||||
'Zone${row + col}'; // Assign a unique name to each zone
|
||||
|
||||
zoneNames.add(zoneName);
|
||||
zoneCoordinates.add(zoneSouthwest);
|
||||
zoneCoordinates.add(zoneNortheast);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<LatLng>> zoneMap = {};
|
||||
for (int i = 0; i < zoneNames.length; i++) {
|
||||
zoneMap[zoneNames[i]] = [
|
||||
zoneCoordinates[i], // Southwest LatLng
|
||||
zoneCoordinates[i + 1], // Northeast LatLng
|
||||
];
|
||||
}
|
||||
|
||||
return zoneMap;
|
||||
}
|
||||
|
||||
void getJsonOfZones() {
|
||||
LatLng southwest = const LatLng(32.111107, 36.062222);
|
||||
LatLng southEast = const LatLng(32.108333, 36.101667);
|
||||
LatLng northeast = const LatLng(32.143889, 36.058889);
|
||||
Map<String, List<LatLng>> zoneMap =
|
||||
generateZoneMap(southwest, southEast, northeast);
|
||||
String jsonMap = json.encode(zoneMap);
|
||||
|
||||
print(jsonMap);
|
||||
}
|
||||
}
|
||||
@@ -1,255 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:vibration/vibration.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/home/captin/home_captain_controller.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,
|
||||
height: mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? mapDriverController.driverEndPage = 190
|
||||
: mapDriverController.carType == 'Mashwari'
|
||||
? 120
|
||||
: 170,
|
||||
// width: 240,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.social_distance),
|
||||
Text(
|
||||
'${mapDriverController.distance} ${'KM'.tr}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.timelapse),
|
||||
Text(
|
||||
mapDriverController.hours > 1
|
||||
? '${'${'Your Ride Duration is '.tr}${mapDriverController.hours}${' H and'.tr}'} ${mapDriverController.minutes} m'
|
||||
: '${'Your Ride Duration is '.tr} ${mapDriverController.minutes} ${'m'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.money_sharp),
|
||||
Text(
|
||||
'${mapDriverController.paymentAmount} ${'\$'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.carType != 'Speed' &&
|
||||
mapDriverController.carType != 'Delivery'
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.timer),
|
||||
Text(
|
||||
mapDriverController
|
||||
.stringRemainingTimeRideBegin1,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.location_on),
|
||||
Text(
|
||||
'${mapDriverController.recentDistanceToDash.toStringAsFixed(0)} ${'KM'.tr}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: Get.width * .2,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.attach_money),
|
||||
Text(
|
||||
mapDriverController.price
|
||||
.toStringAsFixed(2),
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
(mapDriverController.carType == 'Mashwari' ||
|
||||
mapDriverController.carType == 'Comfort') &&
|
||||
mapDriverController.remainingTimeTimerRideBegin > 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
onPressed: () {
|
||||
mapDriverController.finishRideFromDriver();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
print(Get.find<HomeCaptainController>()
|
||||
.comfortPrice);
|
||||
},
|
||||
child: Text(
|
||||
mapDriverController.carType,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
onPressed: () {
|
||||
mapDriverController.finishRideFromDriver();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
mapDriverController.carType,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.carType != 'Comfort' &&
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Stack(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: Get.width * .9,
|
||||
child: LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color: mapDriverController
|
||||
.remainingTimeTimerRideBegin <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 25,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
value: mapDriverController
|
||||
.progressTimerRideBegin
|
||||
.toDouble(),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
mapDriverController
|
||||
.stringRemainingTimeRideBegin,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
))
|
||||
: const SizedBox());
|
||||
}
|
||||
|
||||
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();
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
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/functions/location_controller.dart';
|
||||
import '../../../../controller/home/captin/map_driver_controller.dart';
|
||||
|
||||
class GoogleDriverMap extends StatelessWidget {
|
||||
const GoogleDriverMap({
|
||||
super.key,
|
||||
required this.locationController,
|
||||
});
|
||||
|
||||
final LocationController locationController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Get.put(MapDriverController());
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GetBuilder<MapDriverController>(
|
||||
builder: (controller) => GoogleMap(
|
||||
onMapCreated: controller.onMapCreated,
|
||||
initialCameraPosition: CameraPosition(
|
||||
// bearing: 45,
|
||||
target: locationController.myLocation,
|
||||
zoom: 16,
|
||||
tilt: 40,
|
||||
),
|
||||
onCameraMoveStarted: () {},
|
||||
onCameraMove: (position) {
|
||||
locationController.myLocation = position.target;
|
||||
controller.mapController!
|
||||
.animateCamera(CameraUpdate.newCameraPosition(position));
|
||||
},
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
myLocationEnabled: true,
|
||||
compassEnabled: true,
|
||||
mapType: MapType.normal,
|
||||
trafficEnabled: true,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
zoomControlsEnabled: true,
|
||||
fortyFiveDegreeImageryEnabled: true,
|
||||
zoomGesturesEnabled: true,
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route1'),
|
||||
points: controller.polylineCoordinates,
|
||||
color: AppColor.greenColor,
|
||||
width: 3,
|
||||
),
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route'),
|
||||
points: controller.polylineCoordinatesDestination,
|
||||
color: AppColor.primaryColor,
|
||||
width: 2,
|
||||
),
|
||||
},
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: locationController.myLocation,
|
||||
draggable: true,
|
||||
icon: controller.carIcon,
|
||||
rotation: locationController.heading),
|
||||
Marker(
|
||||
markerId: MarkerId('start'.tr),
|
||||
position: controller.latLngpassengerLocation,
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
),
|
||||
Marker(
|
||||
markerId: MarkerId('end'.tr),
|
||||
position: controller.latLngPassengerDestination,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class GoogleMapApp extends StatelessWidget {
|
||||
const GoogleMapApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapDriverController>(
|
||||
builder: (mapDriverController) => mapDriverController.isRideStarted
|
||||
? Positioned(
|
||||
left: 125,
|
||||
bottom: 20,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
var startLat = Get.find<MapDriverController>()
|
||||
.latLngpassengerLocation
|
||||
.latitude;
|
||||
var startLng = Get.find<MapDriverController>()
|
||||
.latLngpassengerLocation
|
||||
.longitude;
|
||||
|
||||
var endLat = Get.find<MapDriverController>()
|
||||
.latLngPassengerDestination
|
||||
.latitude;
|
||||
var endLng = Get.find<MapDriverController>()
|
||||
.latLngPassengerDestination
|
||||
.longitude;
|
||||
|
||||
String url =
|
||||
'https://www.google.com/maps/dir/$startLat,$startLng/$endLat,$endLng/&directionsmode=driving';
|
||||
if (await canLaunchUrl(Uri.parse(url))) {
|
||||
await launchUrl(Uri.parse(url));
|
||||
} else {
|
||||
throw 'Could not launch google maps';
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
MaterialCommunityIcons.map_marker_radius,
|
||||
size: 45,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
)),
|
||||
)
|
||||
: const SizedBox());
|
||||
}
|
||||
}
|
||||
@@ -1,421 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/info.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/functions/launch.dart';
|
||||
import '../home_captain/widget/call_page.dart';
|
||||
|
||||
class PassengerInfoWindow extends StatelessWidget {
|
||||
const PassengerInfoWindow({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(MapDriverController());
|
||||
return GetBuilder<MapDriverController>(
|
||||
builder: (controller) => controller.isPassengerInfoWindow == true
|
||||
? Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 5,
|
||||
// left: 8,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
height: controller.passengerInfoWindowHeight,
|
||||
width: Get.width,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Go to passenger Location now'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
controller.isRideBegin
|
||||
? const SizedBox()
|
||||
: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
controller.isSocialPressed =
|
||||
true;
|
||||
await controller
|
||||
.driverCallPassenger(); // to check from scam
|
||||
Get.to(
|
||||
() => const CallPage());
|
||||
// launchCommunication('phone',
|
||||
// controller.phone.toString(), '');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
color: AppColor.blueColor,
|
||||
)),
|
||||
const SizedBox(
|
||||
width: 25,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.isSocialPressed =
|
||||
true;
|
||||
launchCommunication(
|
||||
'email',
|
||||
controller.passengerPhone
|
||||
.toString(),
|
||||
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.email,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
const SizedBox(
|
||||
width: 25,
|
||||
),
|
||||
Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration,
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
await controller
|
||||
.openGoogleMapFromDriverToPassenger();
|
||||
},
|
||||
icon: const Icon(
|
||||
MaterialCommunityIcons
|
||||
.map_marker_radius,
|
||||
size: 35,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .22,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
controller.hours > 1
|
||||
? '⌚️ ${controller.hours}h ${controller.minutes}m' // Ride Duration with emoji
|
||||
: '⌚️ ${controller.minutes}m', // Short ride duration
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0), // Add spacing between sections
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .22,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
' ${controller.distance} km', // Distance with emoji
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0), // Add spacing between sections
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .35,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
controller
|
||||
.passengerName, // Passenger name with emoji
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
Text('Total Cost is '.tr,
|
||||
style: AppStyle.title),
|
||||
Text(
|
||||
controller.totalPassenger.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(controller.carType,
|
||||
style: AppStyle.title),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
controller.remainingTimeToPassenger != 0
|
||||
? Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color:
|
||||
controller.remainingTimeToPassenger <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 35,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
value: controller.progressToPassenger
|
||||
.toDouble(),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
controller
|
||||
.stringRemainingTimeToPassenger,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: controller.isRideBegin
|
||||
? const SizedBox()
|
||||
: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Start the Ride'.tr,
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'Is the Passenger in your Car ?'
|
||||
.tr,
|
||||
titleStyle:
|
||||
AppStyle.title,
|
||||
middleText:
|
||||
'don\'t start trip if not '
|
||||
.tr,
|
||||
middleTextStyle:
|
||||
AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
kolor: AppColor
|
||||
.greenColor,
|
||||
onPressed: () async {
|
||||
await controller
|
||||
.startRideFromDriver();
|
||||
Get.back();
|
||||
}),
|
||||
cancel: MyElevatedButton(
|
||||
title:
|
||||
'No ,still Waiting.'
|
||||
.tr,
|
||||
kolor:
|
||||
AppColor.redColor,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
}),
|
||||
controller.isArrivedSend
|
||||
? MyElevatedButton(
|
||||
title: 'I arrive you'.tr,
|
||||
kolor: AppColor.yellowColor,
|
||||
onPressed: () async {
|
||||
if (controller
|
||||
.calculateDistanceBetweenDriverAndPassengerLocation() <
|
||||
40) {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Hi ,I Arrive your site',
|
||||
'I Arrive your site'
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
[]);
|
||||
controller
|
||||
.startTimerToShowDriverWaitPassengerDuration();
|
||||
controller
|
||||
.isArrivedSend =
|
||||
false;
|
||||
} else {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'You are not in near to passenger location'
|
||||
.tr,
|
||||
middleText:
|
||||
'please go to picker location exactly'
|
||||
.tr,
|
||||
confirm:
|
||||
MyElevatedButton(
|
||||
title:
|
||||
'Ok'.tr,
|
||||
onPressed:
|
||||
() {
|
||||
Get.back();
|
||||
}));
|
||||
}
|
||||
})
|
||||
: const SizedBox()
|
||||
],
|
||||
),
|
||||
controller.remainingTimeInPassengerLocatioWait <
|
||||
300 &&
|
||||
controller
|
||||
.remainingTimeInPassengerLocatioWait !=
|
||||
0
|
||||
? Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor:
|
||||
AppColor.accentColor,
|
||||
color: controller
|
||||
.remainingTimeInPassengerLocatioWait <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 50,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
15),
|
||||
value: controller
|
||||
.progressInPassengerLocationFromDriver
|
||||
.toDouble(),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
controller
|
||||
.stringRemainingTimeWaitingPassenger,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: controller.isdriverWaitTimeEnd
|
||||
? MyElevatedButton(
|
||||
title: 'You Can Cancel Trip And get Cost of Trip From'
|
||||
.tr +
|
||||
' ${AppInformation.appName}'
|
||||
.tr,
|
||||
kolor: AppColor
|
||||
.deepPurpleAccent,
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'Are you sure to cancel?'
|
||||
.tr,
|
||||
titleStyle:
|
||||
AppStyle.title,
|
||||
middleText: '',
|
||||
confirm:
|
||||
MyElevatedButton(
|
||||
title:
|
||||
'Yes'.tr,
|
||||
onPressed:
|
||||
() async {
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Driver Cancel Your Trip',
|
||||
'You will be pay the cost to driver or we will get it from you on next trip'
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
[]);
|
||||
await controller
|
||||
.addWaitingTimeCostFromPassengerToDriverWallet();
|
||||
controller
|
||||
.isdriverWaitTimeEnd =
|
||||
false;
|
||||
}));
|
||||
})
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
// : controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
|
||||
// ? Positioned(
|
||||
// bottom: Get.height * .2,
|
||||
// left: 15,
|
||||
// child: Container(
|
||||
// decoration: AppStyle.boxDecoration,
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// Stack(
|
||||
// alignment: Alignment.center,
|
||||
// children: [
|
||||
// const CircularProgressIndicator(
|
||||
// backgroundColor: AppColor.redColor,
|
||||
// strokeWidth: 10,
|
||||
// color: AppColor.redColor,
|
||||
// value: 1,
|
||||
// ),
|
||||
// CircularProgressIndicator(
|
||||
// value: controller.progress,
|
||||
// // Set the color based on the "isNearEnd" condition
|
||||
// color: AppColor.yellowColor,
|
||||
// ),
|
||||
// Text(
|
||||
// '${controller.remainingTimeToShowPassengerInfoWindowFromDriver}',
|
||||
// style: AppStyle.number,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 10,
|
||||
// ),
|
||||
// Text(
|
||||
// 'Please Wait If passenger want To Cancel!'.tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
: const SizedBox(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/info.dart';
|
||||
import 'package:SEFER/controller/functions/location_controller.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:SEFER/views/widgets/my_textField.dart';
|
||||
|
||||
import '../../../../constant/box_name.dart';
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/functions/launch.dart';
|
||||
import '../../../../controller/home/captin/map_driver_controller.dart';
|
||||
import '../../../../main.dart';
|
||||
|
||||
class SosConnect extends StatelessWidget {
|
||||
const SosConnect({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapDriverController>(
|
||||
builder: (mapDriverController) => mapDriverController.isRideStarted
|
||||
? Positioned(
|
||||
left: 5,
|
||||
bottom: 20,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: 60,
|
||||
width: 110,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (box.read(BoxName.sosPhoneDriver) == null) {
|
||||
Get.defaultDialog(
|
||||
title: 'Insert Emergincy Number'.tr,
|
||||
content: Form(
|
||||
key: mapDriverController.formKey1,
|
||||
child: MyTextForm(
|
||||
controller: mapDriverController
|
||||
.sosEmergincyNumberCotroller,
|
||||
label: 'Insert Emergency Number'.tr,
|
||||
hint: 'Insert Emergency Number'.tr,
|
||||
type: TextInputType.phone),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Insert'.tr,
|
||||
onPressed: () {
|
||||
if (mapDriverController
|
||||
.formKey1.currentState!
|
||||
.validate()) {
|
||||
box.write(
|
||||
BoxName.sosPhoneDriver,
|
||||
mapDriverController
|
||||
.sosEmergincyNumberCotroller
|
||||
.text);
|
||||
}
|
||||
}));
|
||||
}
|
||||
launchCommunication(
|
||||
'phone', box.read(BoxName.sosPhoneDriver), '');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.sos_sharp,
|
||||
size: 45,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (box.read(BoxName.sosPhoneDriver) == null) {
|
||||
Get.defaultDialog(
|
||||
title: 'Insert Emergency Number'.tr,
|
||||
content: Form(
|
||||
key: mapDriverController.formKey1,
|
||||
child: MyTextForm(
|
||||
controller: mapDriverController
|
||||
.sosEmergincyNumberCotroller,
|
||||
label: 'Insert Emergency Number'.tr,
|
||||
hint: 'Insert Emergency Number'.tr,
|
||||
type: TextInputType.phone),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Insert'.tr,
|
||||
onPressed: () {
|
||||
if (mapDriverController
|
||||
.formKey1.currentState!
|
||||
.validate()) {
|
||||
box.write(
|
||||
BoxName.sosPhoneDriver,
|
||||
mapDriverController
|
||||
.sosEmergincyNumberCotroller
|
||||
.text);
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
launchCommunication(
|
||||
'whatsapp',
|
||||
'+02${box.read(BoxName.sosPhoneDriver)}', //todo add number from driver
|
||||
"${"Hello this is Driver".tr} ${box.read(BoxName.nameDriver)}.${" My current location is:".tr} https://www.google.com/maps/place/${Get.find<LocationController>().myLocation.latitude},${Get.find<LocationController>().myLocation.longitude}${" \nand I have a trip on".tr} ${AppInformation.appName} ${"App \nwith Passenger ".tr}${mapDriverController.passengerName}");
|
||||
}
|
||||
},
|
||||
child: const Icon(
|
||||
FontAwesome.whatsapp,
|
||||
color: AppColor.greenColor,
|
||||
size: 45,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
: const SizedBox());
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:ride/constant/api_key.dart';
|
||||
// import 'package:ride/constant/box_name.dart';
|
||||
// import 'package:ride/main.dart';
|
||||
// import 'package:zego_uikit_prebuilt_call/zego_uikit_prebuilt_call.dart';
|
||||
|
||||
// class CallPage extends StatelessWidget {
|
||||
// const CallPage({Key? key, required this.callID}) : super(key: key);
|
||||
// final String callID;
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return ZegoUIKitPrebuiltCall(
|
||||
// appID: AK
|
||||
// .zegoCloudAppID, // Fill in the appID that you get from ZEGOCLOUD Admin Console.
|
||||
// appSign: AK
|
||||
// .zegoCloudAppSIGN, // Fill in the appSign that you get from ZEGOCLOUD Admin Console.
|
||||
// userID: box.read(BoxName.passengerID) ?? box.read(BoxName.driverID),
|
||||
// userName: box.read(BoxName.name) ?? box.read(BoxName.nameDriver),
|
||||
// callID: callID,
|
||||
// // You can also use groupVideo/groupVoice/oneOnOneVoice to make more types of calls.
|
||||
// config: ZegoUIKitPrebuiltCallConfig.oneOnOneVoiceCall(),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@@ -1,435 +0,0 @@
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/home/Captin/driver_map_page.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'dart:math' as math;
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/links.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/functions/crud.dart';
|
||||
import '../../../../controller/functions/launch.dart';
|
||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
|
||||
class OrderRequestPage extends StatelessWidget {
|
||||
OrderRequestPage({super.key});
|
||||
OrderRequestController orderRequestController =
|
||||
Get.put(OrderRequestController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final arguments = Get.arguments;
|
||||
final myListString = arguments['myListString'];
|
||||
final myList = arguments['DriverList'];
|
||||
// final pointsList = arguments['PolylineJson'];
|
||||
final body = arguments['body'];
|
||||
Duration durationToAdd = Duration(seconds: int.parse(myList[4]));
|
||||
int hours = durationToAdd.inHours;
|
||||
int minutes = (durationToAdd.inMinutes % 60).round();
|
||||
orderRequestController.startTimer(myList[6].toString(), body.toString());
|
||||
var coords = myList[0].split(',');
|
||||
var coordDestination = myList[1].split(',');
|
||||
BitmapDescriptor startIcon = BitmapDescriptor.defaultMarker;
|
||||
BitmapDescriptor endIcon = BitmapDescriptor.defaultMarker;
|
||||
|
||||
// Parse to double
|
||||
double latPassengerLocation = double.parse(coords[0]);
|
||||
double lngPassengerLocation = double.parse(coords[1]);
|
||||
double latPassengerDestination = double.parse(coordDestination[0]);
|
||||
double lngPassengerDestination = double.parse(coordDestination[1]);
|
||||
|
||||
List<LatLng> pointsDirection = [
|
||||
LatLng(latPassengerLocation, lngPassengerLocation),
|
||||
LatLng(latPassengerDestination, lngPassengerDestination)
|
||||
]; // Calculate the midpoint between the two points
|
||||
// Calculate the minimum and maximum latitude and longitude values
|
||||
double minLatitude =
|
||||
math.min(pointsDirection[0].latitude, pointsDirection[1].latitude);
|
||||
double maxLatitude =
|
||||
math.max(pointsDirection[0].latitude, pointsDirection[1].latitude);
|
||||
double minLongitude =
|
||||
math.min(pointsDirection[0].longitude, pointsDirection[1].longitude);
|
||||
double maxLongitude =
|
||||
math.max(pointsDirection[0].longitude, pointsDirection[1].longitude);
|
||||
// Create a bounding box using the calculated values
|
||||
LatLngBounds bounds = LatLngBounds(
|
||||
southwest: LatLng(minLatitude, minLongitude),
|
||||
northeast: LatLng(maxLatitude, maxLongitude),
|
||||
);
|
||||
// void addCustomStartIcon() async {
|
||||
// Create the marker with the resized image
|
||||
orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
ImageConfiguration config = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
BitmapDescriptor.fromAssetImage(config, 'assets/images/A.png',
|
||||
mipmaps: false)
|
||||
.then((value) {
|
||||
startIcon = value;
|
||||
});
|
||||
ImageConfiguration config1 = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
BitmapDescriptor.fromAssetImage(config1, 'assets/images/b.png',
|
||||
mipmaps: false)
|
||||
.then((value) {
|
||||
endIcon = value;
|
||||
});
|
||||
// }
|
||||
// orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
return MyScafolld(
|
||||
title: 'Order Details'.tr,
|
||||
body: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6),
|
||||
child: ListView(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SizedBox(height: 200, child: Text(pointsList.toString())),
|
||||
// Text(message.notification!.body.toString()),
|
||||
SizedBox(
|
||||
height: Get.height * .2,
|
||||
child: GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
zoom: 12,
|
||||
target: Get.find<HomeCaptainController>().myLocation),
|
||||
cameraTargetBounds: CameraTargetBounds(bounds),
|
||||
myLocationButtonEnabled: true,
|
||||
trafficEnabled: true,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
myLocationEnabled: true,
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: LatLng(
|
||||
latPassengerLocation, lngPassengerLocation),
|
||||
draggable: true,
|
||||
icon: startIcon),
|
||||
Marker(
|
||||
markerId: MarkerId('Destination'.tr),
|
||||
position: LatLng(
|
||||
latPassengerDestination, lngPassengerDestination),
|
||||
draggable: true,
|
||||
icon: endIcon),
|
||||
},
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 1,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('routeOrder'),
|
||||
points: pointsDirection,
|
||||
color: AppColor.primaryColor,
|
||||
width: 2,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color: myList[20].toString() == 'haveSteps'
|
||||
? AppColor.greenColor
|
||||
: AppColor.secondaryColor,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
TextButton.icon(
|
||||
onPressed: () {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
print(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
icon: const Icon(Icons.map),
|
||||
label: myList[20].toString() == 'haveSteps'
|
||||
? Text(
|
||||
'Trip has Steps'.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text('Rouats of Trip'.tr,
|
||||
style: AppStyle.title)),
|
||||
Container(
|
||||
color: myList[13].toString() == 'true'
|
||||
? AppColor.deepPurpleAccent
|
||||
: AppColor.greenColor,
|
||||
child: myList[13].toString() ==
|
||||
'true' //Visa or Cash Method from notify to driver
|
||||
? Text(
|
||||
'Visa',
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text('Cash', style: AppStyle.title),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
double.parse(myList[2]).toStringAsFixed(2),
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
Text(
|
||||
myList[31].toString(),
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
height: Get.height * .2,
|
||||
width: Get.width * .9,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_up,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
myList[12] + ' ' + ' (${myList[11]}) ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
myList[29],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_up,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
myList[5] + ' ' + ' (${myList[4]}) ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
myList[30],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: 'Passenger name : '
|
||||
.tr, // Changed text to be more generic
|
||||
style: AppStyle.subtitle,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: myList[8],
|
||||
style: AppStyle
|
||||
.title), // Assuming myList[8] holds passenger name
|
||||
TextSpan(text: ' (', style: AppStyle.subtitle),
|
||||
TextSpan(
|
||||
text: myList[33].toString(),
|
||||
style: AppStyle
|
||||
.title), // Assuming 'rate' holds the passenger rate
|
||||
TextSpan(text: ' ⭐)', style: AppStyle.subtitle),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
color: AppColor.deepPurpleAccent,
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: 'Cost Of Trip IS '.tr,
|
||||
style: AppStyle.title,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: myList[26], style: AppStyle.headTitle2),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Accept Order'.tr,
|
||||
onPressed: () async {
|
||||
box.write(BoxName.statusDriverLocation, 'on');
|
||||
|
||||
orderRequestController.changeApplied();
|
||||
await CRUD().postFromDialogue(
|
||||
link: AppLink.addDriverOrder,
|
||||
payload: {
|
||||
'driver_id': myList[6].toString(),
|
||||
// box.read(BoxName.driverID).toString(),
|
||||
'order_id': body.toString(),
|
||||
'status': 'Apply'
|
||||
});
|
||||
await CRUD()
|
||||
.post(link: AppLink.updateRides, payload: {
|
||||
'id': myList[16],
|
||||
'rideTimeStart': DateTime.now().toString(),
|
||||
'status': 'Apply',
|
||||
'driver_id': box.read(BoxName.driverID),
|
||||
});
|
||||
// Get.back();
|
||||
List<String> bodyToPassenger = [
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
box.read(BoxName.tokenDriver).toString(),
|
||||
];
|
||||
// print(bodyToPassenger);
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride', 'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
Get.back();
|
||||
Get.to(() => PassengerLocationMapPage(), arguments: {
|
||||
'passengerLocation': myList[0].toString(),
|
||||
'passengerDestination': myList[1].toString(),
|
||||
'Duration': myList[4].toString(),
|
||||
'totalCost': myList[26].toString(),
|
||||
'Distance': myList[5].toString(),
|
||||
'name': myList[8].toString(),
|
||||
'phone': myList[10].toString(),
|
||||
'email': myList[28].toString(),
|
||||
'WalletChecked': myList[13].toString(),
|
||||
'tokenPassenger': myList[9].toString(),
|
||||
'direction':
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/',
|
||||
'DurationToPassenger': myList[15].toString(),
|
||||
'rideId': myList[16].toString(),
|
||||
'passengerId': myList[7].toString(),
|
||||
'driverId': myList[18].toString(),
|
||||
'durationOfRideValue': myList[19].toString(),
|
||||
'paymentAmount': myList[2].toString(),
|
||||
'paymentMethod': myList[13].toString() == 'true'
|
||||
? 'visa'
|
||||
: 'cash',
|
||||
'isHaveSteps': myList[20].toString(),
|
||||
'step0': myList[21].toString(),
|
||||
'step1': myList[22].toString(),
|
||||
'step2': myList[23].toString(),
|
||||
'step3': myList[24].toString(),
|
||||
'step4': myList[25].toString(),
|
||||
'passengerWalletBurc': myList[26].toString(),
|
||||
'timeOfOrder': DateTime.now().toString(),
|
||||
'totalPassenger': myList[2].toString(),
|
||||
'carType': myList[31].toString(),
|
||||
'kazan': myList[32].toString(),
|
||||
});
|
||||
},
|
||||
),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (timerController) {
|
||||
final isNearEnd = timerController.remainingTime <=
|
||||
5; // Define a threshold for "near end"
|
||||
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
CircularProgressIndicator(
|
||||
value: timerController.progress,
|
||||
// Set the color based on the "isNearEnd" condition
|
||||
color: isNearEnd ? Colors.red : Colors.blue,
|
||||
),
|
||||
Text(
|
||||
'${timerController.remainingTime}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Refuse Order'.tr,
|
||||
onPressed: () async {
|
||||
List<String> bodyToPassenger = [
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
box.read(BoxName.tokenDriver).toString(),
|
||||
];
|
||||
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Refused Ride',
|
||||
'${box.read(BoxName.nameDriver)} ${'reject your order.'.tr}',
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
orderRequestController.refuseOrder(
|
||||
myList[16].toString(),
|
||||
);
|
||||
orderRequestController.addRideToNotificationDriverString(
|
||||
myList[16].toString(),
|
||||
myList[29].toString(),
|
||||
myList[30].toString(),
|
||||
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day}',
|
||||
'${DateTime.now().hour}:${DateTime.now().minute}',
|
||||
myList[2].toString(),
|
||||
myList[7].toString(),
|
||||
'wait',
|
||||
myList[31].toString(),
|
||||
myList[33].toString(),
|
||||
myList[2].toString(),
|
||||
myList[5].toString(),
|
||||
myList[4].toString()); //duration
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -1,464 +0,0 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/home/Captin/driver_map_page.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'dart:math' as math;
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/links.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../controller/functions/crud.dart';
|
||||
import '../../../../controller/functions/launch.dart';
|
||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||
import '../../../widgets/elevated_btn.dart';
|
||||
|
||||
class OrderSpeedRequest extends StatelessWidget {
|
||||
OrderSpeedRequest({super.key});
|
||||
OrderRequestController orderRequestController =
|
||||
Get.put(OrderRequestController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final arguments = Get.arguments;
|
||||
final myListString = arguments['myListString'];
|
||||
final myList = arguments['DriverList'];
|
||||
// final pointsList = arguments['PolylineJson'];
|
||||
final body = arguments['body'];
|
||||
Duration durationToAdd = Duration(seconds: int.parse(myList[4]));
|
||||
int hours = durationToAdd.inHours;
|
||||
int minutes = (durationToAdd.inMinutes % 60).round();
|
||||
orderRequestController.startTimerSpeed(
|
||||
myList[6].toString(), body.toString());
|
||||
var coords = myList[0].split(',');
|
||||
var coordDestination = myList[1].split(',');
|
||||
BitmapDescriptor startIcon = BitmapDescriptor.defaultMarker;
|
||||
BitmapDescriptor endIcon = BitmapDescriptor.defaultMarker;
|
||||
|
||||
// Parse to double
|
||||
double latPassengerLocation = double.parse(coords[0]);
|
||||
double lngPassengerLocation = double.parse(coords[1]);
|
||||
double latPassengerDestination = double.parse(coordDestination[0]);
|
||||
double lngPassengerDestination = double.parse(coordDestination[1]);
|
||||
|
||||
List<LatLng> pointsDirection = [
|
||||
LatLng(latPassengerLocation, lngPassengerLocation),
|
||||
LatLng(latPassengerDestination, lngPassengerDestination)
|
||||
]; // Calculate the midpoint between the two points
|
||||
// Calculate the minimum and maximum latitude and longitude values
|
||||
double minLatitude =
|
||||
math.min(pointsDirection[0].latitude, pointsDirection[1].latitude);
|
||||
double maxLatitude =
|
||||
math.max(pointsDirection[0].latitude, pointsDirection[1].latitude);
|
||||
double minLongitude =
|
||||
math.min(pointsDirection[0].longitude, pointsDirection[1].longitude);
|
||||
double maxLongitude =
|
||||
math.max(pointsDirection[0].longitude, pointsDirection[1].longitude);
|
||||
// Create a bounding box using the calculated values
|
||||
LatLngBounds bounds = LatLngBounds(
|
||||
southwest: LatLng(minLatitude, minLongitude),
|
||||
northeast: LatLng(maxLatitude, maxLongitude),
|
||||
);
|
||||
// void addCustomStartIcon() async {
|
||||
// Create the marker with the resized image
|
||||
orderRequestController.calculateConsumptionFuel();
|
||||
|
||||
ImageConfiguration config = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
BitmapDescriptor.fromAssetImage(config, 'assets/images/A.png',
|
||||
mipmaps: false)
|
||||
.then((value) {
|
||||
startIcon = value;
|
||||
});
|
||||
ImageConfiguration config1 = ImageConfiguration(
|
||||
size: const Size(25, 25), devicePixelRatio: Get.pixelRatio);
|
||||
BitmapDescriptor.fromAssetImage(config1, 'assets/images/b.png',
|
||||
mipmaps: false)
|
||||
.then((value) {
|
||||
endIcon = value;
|
||||
});
|
||||
// }
|
||||
// double mpg = 0;
|
||||
// calculateConsumptionFuel() {
|
||||
// mpg = Get.find<HomeCaptainController>().fuelPrice /
|
||||
// 12; //todo in register car add mpg in box
|
||||
// }
|
||||
|
||||
return MyScafolld(
|
||||
title: 'Order Details'.tr,
|
||||
body: [
|
||||
ListView(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SizedBox(height: 200, child: Text(pointsList.toString())),
|
||||
// Text(message.notification!.body.toString()),
|
||||
SizedBox(
|
||||
height: Get.height * .2,
|
||||
child: GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
zoom: 12,
|
||||
target: Get.find<HomeCaptainController>().myLocation),
|
||||
cameraTargetBounds: CameraTargetBounds(bounds),
|
||||
myLocationButtonEnabled: true,
|
||||
trafficEnabled: true,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
myLocationEnabled: true,
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position:
|
||||
LatLng(latPassengerLocation, lngPassengerLocation),
|
||||
draggable: true,
|
||||
icon: startIcon),
|
||||
Marker(
|
||||
markerId: MarkerId('Destination'.tr),
|
||||
position: LatLng(
|
||||
latPassengerDestination, lngPassengerDestination),
|
||||
draggable: true,
|
||||
icon: endIcon),
|
||||
},
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 1,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('routeOrder'),
|
||||
points: pointsDirection,
|
||||
color: AppColor.primaryColor,
|
||||
width: 2,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color: myList[20].toString() == 'haveSteps'
|
||||
? AppColor.greenColor
|
||||
: AppColor.secondaryColor,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
TextButton.icon(
|
||||
onPressed: () {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
print(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
icon: const Icon(Icons.map),
|
||||
label: myList[20].toString() == 'haveSteps'
|
||||
? Text(
|
||||
'Trip has Steps'.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text('Rouats of Trip'.tr,
|
||||
style: AppStyle.title)),
|
||||
Container(
|
||||
color: myList[13].toString() == 'true'
|
||||
? AppColor.deepPurpleAccent
|
||||
: AppColor.greenColor,
|
||||
child: myList[13].toString() ==
|
||||
'true' //Visa or Cash Method from notify to driver
|
||||
? Text(
|
||||
'Visa',
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text('Cash', style: AppStyle.title),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
double.parse(myList[2]).toStringAsFixed(2),
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
Text(
|
||||
myList[31].toString(),
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
height: Get.height * .2,
|
||||
width: Get.width * .9,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_up,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
myList[12] + ' ' + ' (${myList[11]}) ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
myList[29],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_up,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
myList[5] + ' ' + ' (${myList[4]}) ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
myList[30],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: 'Passenger name : '
|
||||
.tr, // Changed text to be more generic
|
||||
style: AppStyle.subtitle,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: myList[8],
|
||||
style: AppStyle
|
||||
.title), // Assuming myList[8] holds passenger name
|
||||
TextSpan(text: ' (', style: AppStyle.subtitle),
|
||||
TextSpan(
|
||||
text: myList[33].toString(),
|
||||
style: AppStyle
|
||||
.title), // Assuming 'rate' holds the passenger rate
|
||||
TextSpan(text: ' ⭐)', style: AppStyle.subtitle),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
color: AppColor.deepPurpleAccent,
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: 'Cost Of Trip IS '.tr,
|
||||
style: AppStyle.title,
|
||||
children: [
|
||||
TextSpan(text: myList[26], style: AppStyle.headTitle2),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
kolor: AppColor.greenColor,
|
||||
title: 'Accept Order'.tr,
|
||||
onPressed: () async {
|
||||
box.write(BoxName.statusDriverLocation, 'on');
|
||||
|
||||
var res = await CRUD()
|
||||
.post(link: AppLink.updateStausFromSpeed, payload: {
|
||||
'id': myList[16],
|
||||
'rideTimeStart': DateTime.now().toString(),
|
||||
'status': 'Apply',
|
||||
'driver_id': box.read(BoxName.driverID),
|
||||
});
|
||||
// .then((value) {
|
||||
// var json = jsonDecode(res);
|
||||
print('res $res');
|
||||
if (res == "failure") {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
"This ride is already taken by another driver."
|
||||
.tr,
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
middleTextStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
Get.back();
|
||||
}));
|
||||
} else if (jsonDecode(res)['status'] == "success") {
|
||||
List<String> bodyToPassenger = [
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.nameDriver).toString(),
|
||||
box.read(BoxName.tokenDriver).toString(),
|
||||
];
|
||||
await CRUD().postFromDialogue(
|
||||
link: AppLink.addDriverOrder,
|
||||
payload: {
|
||||
'driver_id': myList[6].toString(),
|
||||
// box.read(BoxName.driverID).toString(),
|
||||
'order_id': body.toString(),
|
||||
'status': 'Apply'
|
||||
});
|
||||
// print(bodyToPassenger);
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride', 'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
bodyToPassenger,
|
||||
);
|
||||
Get.back();
|
||||
Get.to(() => PassengerLocationMapPage(), arguments: {
|
||||
'passengerLocation': myList[0].toString(),
|
||||
'passengerDestination': myList[1].toString(),
|
||||
'Duration': myList[4].toString(),
|
||||
'totalCost': myList[26].toString(),
|
||||
'Distance': myList[5].toString(),
|
||||
'name': myList[8].toString(),
|
||||
'phone': myList[10].toString(),
|
||||
'email': myList[28].toString(),
|
||||
'WalletChecked': myList[13].toString(),
|
||||
'tokenPassenger': myList[9].toString(),
|
||||
'direction':
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/',
|
||||
'DurationToPassenger': myList[15].toString(),
|
||||
'rideId': myList[16].toString(),
|
||||
'passengerId': myList[7].toString(),
|
||||
'driverId': myList[18].toString(),
|
||||
'durationOfRideValue': myList[19].toString(),
|
||||
'paymentAmount': myList[2].toString(),
|
||||
'paymentMethod': myList[13].toString() == 'true'
|
||||
? 'visa'
|
||||
: 'cash',
|
||||
'isHaveSteps': myList[20].toString(),
|
||||
'step0': myList[21].toString(),
|
||||
'step1': myList[22].toString(),
|
||||
'step2': myList[23].toString(),
|
||||
'step3': myList[24].toString(),
|
||||
'step4': myList[25].toString(),
|
||||
'passengerWalletBurc': myList[26].toString(),
|
||||
'timeOfOrder': DateTime.now().toString(),
|
||||
'totalPassenger': myList[2].toString(),
|
||||
'carType': myList[31].toString(),
|
||||
'kazan': myList[32].toString(),
|
||||
});
|
||||
}
|
||||
// });
|
||||
// Get.back();
|
||||
},
|
||||
),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (timerController) {
|
||||
final isNearEnd = timerController.remainingTimeSpeed <=
|
||||
5; // Define a threshold for "near end"
|
||||
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
CircularProgressIndicator(
|
||||
value: timerController.progressSpeed,
|
||||
// Set the color based on the "isNearEnd" condition
|
||||
color: isNearEnd ? Colors.red : Colors.blue,
|
||||
),
|
||||
Text(
|
||||
'${timerController.remainingTimeSpeed}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Refuse Order'.tr,
|
||||
onPressed: () async {
|
||||
Get.defaultDialog(
|
||||
title: 'Reject Order'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await Get.find<TextToSpeechController>()
|
||||
.speakText(
|
||||
'You can decline a request without any cost'
|
||||
.tr);
|
||||
},
|
||||
icon: const Icon(Icons.headphones),
|
||||
),
|
||||
Text(
|
||||
'You can decline a request without any cost'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
)
|
||||
],
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
}));
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// import 'dart:io';
|
||||
//
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:get/get.dart';
|
||||
// import '../../../controller/functions/ocr_controller.dart';
|
||||
//
|
||||
// class PassportDataExtractorWidget extends StatelessWidget {
|
||||
// final PassportDataExtractor passportDataExtractor =
|
||||
// Get.put(PassportDataExtractor());
|
||||
// final PassportDataController controller = Get.put(PassportDataController());
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: const Text('Passport Data Extractor'),
|
||||
// ),
|
||||
// body: Column(
|
||||
// children: [
|
||||
// ElevatedButton(
|
||||
// onPressed: controller.extractDataAndDrawBoundingBoxes,
|
||||
// child: const Text('Extract Data'),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Center(
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// GetBuilder<PassportDataController>(
|
||||
// builder: (controller) => CustomPaint(
|
||||
// painter: BoundingBoxPainter(
|
||||
// controller.extractedTextWithCoordinates),
|
||||
// child: GetBuilder<PassportDataExtractor>(
|
||||
// builder: (controller) =>
|
||||
// Image.file(File(passportDataExtractor.image!.path)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@@ -1,90 +0,0 @@
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/controller/profile/setting_controller.dart';
|
||||
import 'package:SEFER/views/home/profile/passenger_profile_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/lang/languages.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
class SettingsCaptain extends StatelessWidget {
|
||||
const SettingsCaptain({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(SettingController());
|
||||
return MyScafolld(
|
||||
title: 'Settings'.tr,
|
||||
body: [
|
||||
ListView(
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
leading: const Icon(Icons.language),
|
||||
title: Text(
|
||||
'Language'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
subtitle: Text('You can change the language of the app'.tr),
|
||||
onTap: () => Get.to(const Language()),
|
||||
),
|
||||
const Divider(
|
||||
endIndent: 44,
|
||||
indent: 44,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.place_outlined),
|
||||
title: Text(
|
||||
'Change Country'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
subtitle:
|
||||
Text('You can change the Country to get all features'.tr),
|
||||
onTap: () => Get.to(MyScafolld(
|
||||
title: 'Change Country'.tr,
|
||||
body: [CountryPickerFromSetting()],
|
||||
isleading: true)),
|
||||
),
|
||||
const Divider(
|
||||
endIndent: 44,
|
||||
indent: 44,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(
|
||||
MaterialCommunityIcons.map_marker_radius,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
title: Text(
|
||||
'Google Map App'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
subtitle: Text(
|
||||
'If you want to make Google Map App run directly when you apply order'
|
||||
.tr),
|
||||
trailing:
|
||||
GetBuilder<SettingController>(builder: (settingController) {
|
||||
return CupertinoSwitch(
|
||||
value: settingController.isGoogleMapsEnabled,
|
||||
onChanged: (bool value) {
|
||||
settingController.onChangMapApp();
|
||||
},
|
||||
);
|
||||
}),
|
||||
),
|
||||
const Divider(
|
||||
endIndent: 44,
|
||||
indent: 44,
|
||||
),
|
||||
// ListTile(
|
||||
// leading: const Icon(Icons.account_circle),
|
||||
// title: const Text('Account'),
|
||||
// onTap: () => Navigator.pushNamed(context, '/account-settings'),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../controller/functions/ocr_controller.dart';
|
||||
|
||||
class TextRecognizerAPI extends StatelessWidget {
|
||||
const TextRecognizerAPI({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(ScanDocumentsByApi());
|
||||
return GetBuilder<ScanDocumentsByApi>(
|
||||
builder: (controller) => Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Api'),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
controller.matchFaceApi();
|
||||
},
|
||||
icon: const Icon(Icons.face),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Center(
|
||||
child: controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Image.memory(
|
||||
controller.imagePortrait,
|
||||
width: 60,
|
||||
),
|
||||
Image.memory(
|
||||
controller.imageSignature,
|
||||
width: 60,
|
||||
),
|
||||
Image.memory(
|
||||
controller.imageDocumentFrontSide,
|
||||
width: 250,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(controller.responseMap['authenticity_meta']
|
||||
.toString()),
|
||||
Text(
|
||||
'countryName: ${controller.responseMap['data']['countryName'].toString()}'),
|
||||
Text(
|
||||
'Expiry Date: ${controller.responseMap['data']['ocr']['dateOfExpiry'].toString()}'),
|
||||
// Add more Text widgets to display other record values
|
||||
Text(
|
||||
'Address: ${controller.responseMap['data']['ocr']['address'].toString()}'),
|
||||
Text(
|
||||
'City: ${controller.responseMap['data']['ocr']['addressCity'].toString()}'),
|
||||
Text(
|
||||
'Jurisdiction Code: ${controller.responseMap['data']['ocr']['addressJurisdictionCode'].toString()}'),
|
||||
Text(
|
||||
'Postal Code: ${controller.responseMap['data']['ocr']['addressPostalCode'].toString()}'),
|
||||
Text(
|
||||
'Street: ${controller.responseMap['data']['ocr']['addressStreet'].toString()}'),
|
||||
Text(
|
||||
'Date of Birth: ${controller.responseMap['data']['ocr']['dateOfBirth'].toString()}'),
|
||||
Text(
|
||||
'Date of Issue: ${controller.responseMap['data']['ocr']['dateOfIssue'].toString()}'),
|
||||
Text(
|
||||
'Drivers License Class: ${controller.responseMap['data']['ocr']['dlClass'].toString()}'),
|
||||
Text(
|
||||
'Document Number: ${controller.responseMap['data']['ocr']['documentNumber'].toString()}'),
|
||||
Text(
|
||||
'Eye Color: ${controller.responseMap['data']['ocr']['eyesColor'].toString()}'),
|
||||
Text(
|
||||
'Given Names: ${controller.responseMap['data']['ocr']['givenNames'].toString()}'),
|
||||
Text(
|
||||
'Height: ${controller.responseMap['data']['ocr']['height'].toString()}'),
|
||||
Text(
|
||||
'Issuing State Code: ${controller.responseMap['data']['ocr']['issuingStateCode'].toString()}'),
|
||||
Text(
|
||||
'Name: ${controller.responseMap['data']['ocr']['name'].toString()}'),
|
||||
Text(
|
||||
'Sex: ${controller.responseMap['data']['ocr']['sex'].toString()}'),
|
||||
Text(
|
||||
'Surname: ${controller.responseMap['data']['ocr']['surname'].toString()}'),
|
||||
Text(
|
||||
'Valid State: ${controller.responseMap['data']['ocr']['validState'].toString()}'),
|
||||
],
|
||||
),
|
||||
))));
|
||||
}
|
||||
}
|
||||
// class TextExtractionView extends StatelessWidget {
|
||||
// TextExtractionView({super.key});
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// Get.put(TextExtractionController());
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: const Text('Text Extraction'),
|
||||
// ),
|
||||
// body: GetBuilder<TextExtractionController>(builder: (controller) {
|
||||
// return Center(
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// ElevatedButton(
|
||||
// onPressed: () {},
|
||||
// child: const Text('Pick Image and Extract Text'),
|
||||
// ),
|
||||
// const SizedBox(height: 20),
|
||||
// controller.isloading
|
||||
// ? const MyCircularProgressIndicator()
|
||||
// : Text(controller.extractedText),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
// class TextRecognizerWidget extends StatelessWidget {
|
||||
// const TextRecognizerWidget({super.key});
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// Get.put(TextMLGoogleRecognizerController());
|
||||
// return GetBuilder<TextMLGoogleRecognizerController>(
|
||||
// builder: (controller) => Scaffold(
|
||||
// appBar: AppBar(),
|
||||
// body: Center(
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text('${controller.decode['DRIVER_LICENSE'].toString()}'),
|
||||
// Text('DL: ${controller.decode['dl_number'].toString()}'),
|
||||
// Text(
|
||||
// 'Expiry Date: ${controller.decode['expiry_date'].toString()}'),
|
||||
// Text('Last Name: ${controller.decode['lastName'].toString()}'),
|
||||
// Text(
|
||||
// 'First Name: ${controller.decode['firstName'].toString()}'),
|
||||
// Text('Address: ${controller.decode['address'].toString()}'),
|
||||
// Text('Date of Birth: ${controller.decode['dob'].toString()}'),
|
||||
// Text('RSTR: ${controller.decode['rstr'].toString()}'),
|
||||
// Text('Class: ${controller.decode['class'].toString()}'),
|
||||
// Text('End: ${controller.decode['end'].toString()}'),
|
||||
// Text('DD: ${controller.decode['dd'].toString()}'),
|
||||
// Text('Sex: ${controller.decode['sex'].toString()}'),
|
||||
// Text('Hair: ${controller.decode['hair'].toString()}'),
|
||||
// Text('Eyes: ${controller.decode['eyes'].toString()}'),
|
||||
// // and so on for other fields
|
||||
// ],
|
||||
// ))));
|
||||
// }
|
||||
// }
|
||||
|
||||
// class PassportPage extends StatelessWidget {
|
||||
// PassportPage({super.key});
|
||||
// PassportRecognizerController passportRecognizerController =
|
||||
// Get.put(PassportRecognizerController());
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: const Text('Driver License'),
|
||||
// ),
|
||||
// body: const Center(child: Text('data')));
|
||||
// }
|
||||
// }
|
||||
@@ -3,7 +3,6 @@ import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/widget/call_page.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -261,7 +260,7 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
HapticFeedback.heavyImpact();
|
||||
Get.to(() => const CallPage());
|
||||
// Get.to(() => const CallPage());
|
||||
// Get.to(() => PassengerCallPage());
|
||||
},
|
||||
icon: const Icon(
|
||||
|
||||
@@ -3,7 +3,6 @@ import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/auth/captin/register_captin.dart';
|
||||
import 'package:SEFER/views/home/my_wallet/passenger_wallet.dart';
|
||||
import 'package:SEFER/views/home/profile/feed_back_page.dart';
|
||||
import 'package:SEFER/views/home/profile/order_history.dart';
|
||||
@@ -162,7 +161,8 @@ class MapMenuWidget extends StatelessWidget {
|
||||
children: [
|
||||
IconMainPageMap(
|
||||
onTap: () {
|
||||
Get.to(const RegisterCaptin());
|
||||
// Get.to(const RegisterCaptin());
|
||||
//todo use url to use driver app
|
||||
},
|
||||
title: 'Driver'.tr,
|
||||
icon: WeatherIcons.wi_moon_14,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/views/admin/captain/form_captain.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
@@ -269,10 +268,10 @@ void showAddLocationDialog(BuildContext context, int index) {
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: Get.width,
|
||||
child: formSearchCaptain(),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: Get.width,
|
||||
// child: formSearchCaptain(),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
|
||||
Reference in New Issue
Block a user