10/15/1
This commit is contained in:
@@ -30,11 +30,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
<string>2</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>1.01</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter_sms/flutter_sms.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
@@ -6,7 +7,6 @@ import '../../../constant/links.dart';
|
|||||||
import '../../../main.dart';
|
import '../../../main.dart';
|
||||||
import '../../functions/crud.dart';
|
import '../../functions/crud.dart';
|
||||||
import '../../functions/location_controller.dart';
|
import '../../functions/location_controller.dart';
|
||||||
import 'map_driver_controller.dart';
|
|
||||||
|
|
||||||
class HomeCaptainController extends GetxController {
|
class HomeCaptainController extends GetxController {
|
||||||
bool isActive = false;
|
bool isActive = false;
|
||||||
@@ -62,6 +62,14 @@ class HomeCaptainController extends GetxController {
|
|||||||
super.onInit();
|
super.onInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sendSMSToRecipents(String message, List<String> recipents) async {
|
||||||
|
String _result = await sendSMS(message: message, recipients: recipents)
|
||||||
|
.catchError((onError) {
|
||||||
|
print(onError);
|
||||||
|
});
|
||||||
|
print(_result);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
activeTimer?.cancel();
|
activeTimer?.cancel();
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class MapPassengerController extends GetxController {
|
|||||||
bool rideTimerBegin = false;
|
bool rideTimerBegin = false;
|
||||||
double progressTimerRideBegin = 0;
|
double progressTimerRideBegin = 0;
|
||||||
int remainingTimeTimerRideBegin = 60;
|
int remainingTimeTimerRideBegin = 60;
|
||||||
late String stringRemainingTimeRideBegin;
|
String stringRemainingTimeRideBegin = '';
|
||||||
|
|
||||||
void onChangedPassengerCount(int newValue) {
|
void onChangedPassengerCount(int newValue) {
|
||||||
selectedPassengerCount = newValue;
|
selectedPassengerCount = newValue;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import 'package:ride/views/home/Captin/home_captin.dart';
|
|||||||
import 'package:ride/views/home/map_page.dart';
|
import 'package:ride/views/home/map_page.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
|
import '../home/captin/home_captain_controller.dart';
|
||||||
|
|
||||||
class RateController extends GetxController {
|
class RateController extends GetxController {
|
||||||
double selectedRateItemId = -1;
|
double selectedRateItemId = -1;
|
||||||
TextEditingController comment = TextEditingController();
|
TextEditingController comment = TextEditingController();
|
||||||
@@ -31,6 +33,8 @@ class RateController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void addRateToPassenger() async {
|
void addRateToPassenger() async {
|
||||||
|
HomeCaptainController homeCaptainController =
|
||||||
|
Get.find<HomeCaptainController>();
|
||||||
if (selectedRateItemId < 1) {
|
if (selectedRateItemId < 1) {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'You Should choose rate figure'.tr,
|
title: 'You Should choose rate figure'.tr,
|
||||||
@@ -46,6 +50,7 @@ class RateController extends GetxController {
|
|||||||
'comment': comment.text,
|
'comment': comment.text,
|
||||||
});
|
});
|
||||||
Get.offAll(const HomeCaptain());
|
Get.offAll(const HomeCaptain());
|
||||||
|
homeCaptainController.isActive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ class HomeCaptain extends StatelessWidget {
|
|||||||
'Total Duration: ${homeCaptainController.calculateTotalDuration()} seconds',
|
'Total Duration: ${homeCaptainController.calculateTotalDuration()} seconds',
|
||||||
style: const TextStyle(fontSize: 20),
|
style: const TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
homeCaptainController.sendSMSToRecipents(
|
||||||
|
'hi from Sefer', ['+962798583052']);
|
||||||
|
},
|
||||||
|
child: const Text('send msg')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import '../../constant/style.dart';
|
|||||||
import '../../controller/functions/location_controller.dart';
|
import '../../controller/functions/location_controller.dart';
|
||||||
import '../home/map_widget.dart/passenger_info_window.dart';
|
import '../home/map_widget.dart/passenger_info_window.dart';
|
||||||
|
|
||||||
class PassengerLocationDirection extends StatelessWidget {
|
class PassengerLocationMapPage extends StatelessWidget {
|
||||||
PassengerLocationDirection({super.key});
|
PassengerLocationMapPage({super.key});
|
||||||
final LocationController locationController = Get.put(LocationController());
|
final LocationController locationController = Get.put(LocationController());
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|||||||
@@ -181,16 +181,16 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
box.read(BoxName.tokenDriver).toString(),
|
box.read(BoxName.tokenDriver).toString(),
|
||||||
];
|
];
|
||||||
// print(bodyToPassenger);
|
// print(bodyToPassenger);
|
||||||
FirebaseMessagesController()
|
// FirebaseMessagesController()
|
||||||
.sendNotificationToPassengerToken(
|
// .sendNotificationToPassengerToken(
|
||||||
'Apply Ride',
|
// 'Apply Ride',
|
||||||
arguments['DriverList'][9].toString(),
|
// arguments['DriverList'][9].toString(),
|
||||||
arguments['DriverList'][9].toString(),
|
// arguments['DriverList'][9].toString(),
|
||||||
// box.read(BoxName.tokenDriver).toString(),
|
// // box.read(BoxName.tokenDriver).toString(),
|
||||||
bodyToPassenger,
|
// bodyToPassenger,
|
||||||
);
|
// );
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.to(() => PassengerLocationDirection(), arguments: {
|
Get.to(() => PassengerLocationMapPage(), arguments: {
|
||||||
'passengerLocation': myList[0].toString(),
|
'passengerLocation': myList[0].toString(),
|
||||||
'Duration': myList[4].toString(),
|
'Duration': myList[4].toString(),
|
||||||
'Distance': myList[5].toString(),
|
'Distance': myList[5].toString(),
|
||||||
|
|||||||
@@ -326,6 +326,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
|
flutter_sms:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_sms
|
||||||
|
sha256: "2fe5f584f02596343557eeca56348f9b82413fefe83a423fab880cdbdf54d8d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.3"
|
||||||
flutter_spinkit:
|
flutter_spinkit:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dependencies:
|
|||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
crypto: ^3.0.3
|
crypto: ^3.0.3
|
||||||
flutter_rating_bar: ^4.0.1
|
flutter_rating_bar: ^4.0.1
|
||||||
|
flutter_sms: ^2.3.3
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user