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