4/9/3
This commit is contained in:
@@ -86,10 +86,6 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- flutter_secure_storage (6.0.0):
|
- flutter_secure_storage (6.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_sound (9.2.13):
|
|
||||||
- Flutter
|
|
||||||
- flutter_sound_core (= 9.2.13)
|
|
||||||
- flutter_sound_core (9.2.13)
|
|
||||||
- flutter_tts (0.0.1):
|
- flutter_tts (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FMDB (2.7.9):
|
- FMDB (2.7.9):
|
||||||
@@ -282,7 +278,6 @@ DEPENDENCIES:
|
|||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||||
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
|
|
||||||
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
|
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
|
||||||
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
||||||
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
||||||
@@ -316,7 +311,6 @@ SPEC REPOS:
|
|||||||
- FirebaseCoreInternal
|
- FirebaseCoreInternal
|
||||||
- FirebaseInstallations
|
- FirebaseInstallations
|
||||||
- FirebaseMessaging
|
- FirebaseMessaging
|
||||||
- flutter_sound_core
|
|
||||||
- FMDB
|
- FMDB
|
||||||
- GoogleDataTransport
|
- GoogleDataTransport
|
||||||
- GoogleMaps
|
- GoogleMaps
|
||||||
@@ -365,8 +359,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||||
flutter_secure_storage:
|
flutter_secure_storage:
|
||||||
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
:path: ".symlinks/plugins/flutter_secure_storage/ios"
|
||||||
flutter_sound:
|
|
||||||
:path: ".symlinks/plugins/flutter_sound/ios"
|
|
||||||
flutter_tts:
|
flutter_tts:
|
||||||
:path: ".symlinks/plugins/flutter_tts/ios"
|
:path: ".symlinks/plugins/flutter_tts/ios"
|
||||||
geolocator_apple:
|
geolocator_apple:
|
||||||
@@ -431,8 +423,6 @@ SPEC CHECKSUMS:
|
|||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
|
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
|
||||||
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
||||||
flutter_sound: c60effa2a350fb977885f0db2fbc4c1ad5160900
|
|
||||||
flutter_sound_core: 26c10e5832e76aaacfae252d8925232281c486ae
|
|
||||||
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
|
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
|
||||||
FMDB: aa44149f6fb634b1ac54f64f47064bb0d0c5a032
|
FMDB: aa44149f6fb634b1ac54f64f47064bb0d0c5a032
|
||||||
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
|
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||||
|
import 'package:SEFER/views/home/Captin/home_captain/widget/call_page.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -200,18 +201,41 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (message.notification!.title! == 'Call Income') {
|
} else if (message.notification!.title! == 'Call Income') {
|
||||||
var myListString = message.data['passengerList'];
|
try {
|
||||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
var myListString = message.data['passengerList'];
|
||||||
NotificationController().showNotification(
|
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||||
'Call Income'.tr,
|
if (Platform.isAndroid) {
|
||||||
message.notification!.body!,
|
NotificationController().showNotification(
|
||||||
'order',
|
'Call Income'.tr,
|
||||||
);
|
message.notification!.body!,
|
||||||
Get.to(() => PassengerCallPage(
|
'order',
|
||||||
channelName: driverList[1].toString(),
|
);
|
||||||
token: driverList[0].toString(),
|
}
|
||||||
remoteID: driverList[2].toString(),
|
// Assuming GetMaterialApp is initialized and context is valid for navigation
|
||||||
));
|
Get.to(() => PassengerCallPage(
|
||||||
|
channelName: driverList[1].toString(),
|
||||||
|
token: driverList[0].toString(),
|
||||||
|
remoteID: driverList[2].toString(),
|
||||||
|
));
|
||||||
|
} catch (e) {
|
||||||
|
print('Error navigating to PassengerCallPage: $e');
|
||||||
|
}
|
||||||
|
} else if (message.notification!.title! == 'Call End') {
|
||||||
|
try {
|
||||||
|
var myListString = message.data['passengerList'];
|
||||||
|
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||||
|
if (Platform.isAndroid) {
|
||||||
|
NotificationController().showNotification(
|
||||||
|
'Call End'.tr,
|
||||||
|
message.notification!.body!,
|
||||||
|
'order',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Assuming GetMaterialApp is initialized and context is valid for navigation
|
||||||
|
Get.off(const CallPage());
|
||||||
|
} catch (e) {
|
||||||
|
print('Error navigating to PassengerCallPage: $e');
|
||||||
|
}
|
||||||
} else if (message.notification!.title! == 'Driver Cancel Your Trip') {
|
} else if (message.notification!.title! == 'Driver Cancel Your Trip') {
|
||||||
// Get.snackbar(
|
// Get.snackbar(
|
||||||
// 'You will be pay the cost to driver or we will get it from you on next trip'
|
// 'You will be pay the cost to driver or we will get it from you on next trip'
|
||||||
|
|||||||
@@ -1,159 +1,160 @@
|
|||||||
// // import 'dart:io';
|
// import 'dart:io';
|
||||||
// //
|
//
|
||||||
// // import 'package:flutter/material.dart';
|
|
||||||
// // import 'package:flutter_sound/flutter_sound.dart';
|
|
||||||
// // import 'package:get/get.dart';
|
|
||||||
// // import 'package:permission_handler/permission_handler.dart';
|
|
||||||
// //
|
|
||||||
// // import '../home/map_passenger_controller.dart';
|
|
||||||
// //
|
|
||||||
// // class AudioController extends GetxController {
|
|
||||||
// // final recorder = FlutterSoundRecorder();
|
|
||||||
// // bool isRecording = false;
|
|
||||||
// //
|
|
||||||
// // @override
|
|
||||||
// // void onInit() {
|
|
||||||
// // super.onInit();
|
|
||||||
// // initRecorder();
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // Future<void> initRecorder() async {
|
|
||||||
// // final status = await Permission.microphone.request();
|
|
||||||
// // if (status != PermissionStatus.granted) {
|
|
||||||
// // if (status.isPermanentlyDenied) {
|
|
||||||
// // // Handle permission permanently denied
|
|
||||||
// // showPermissionDeniedDialog();
|
|
||||||
// // } else if (status.isDenied) {
|
|
||||||
// // // Handle permission denied
|
|
||||||
// // showPermissionDeniedSnackbar();
|
|
||||||
// // } else if (status.isRestricted) {
|
|
||||||
// // // Handle permission restricted
|
|
||||||
// // showPermissionDeniedSnackbar();
|
|
||||||
// // }
|
|
||||||
// // return;
|
|
||||||
// // }
|
|
||||||
// // await recorder.openRecorder();
|
|
||||||
// // recorder.setSubscriptionDuration(const Duration(minutes: 50));
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // Future<void> startRecording() async {
|
|
||||||
// // if (!recorder.isStopped) {
|
|
||||||
// // await recorder.startRecorder();
|
|
||||||
// // }
|
|
||||||
// // isRecording = true;
|
|
||||||
// // update();
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // Future<void> stopRecording() async {
|
|
||||||
// // final filePath = await recorder.stopRecorder();
|
|
||||||
// // final audioFile = File(filePath!);
|
|
||||||
// // print('Recorded file path: $audioFile');
|
|
||||||
// // // Now you can send this file to the server
|
|
||||||
// // isRecording = false;
|
|
||||||
// // update();
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // @override
|
|
||||||
// // void onClose() {
|
|
||||||
// // recorder.stopRecorder();
|
|
||||||
// // super.onClose();
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // void showPermissionDeniedDialog() {
|
|
||||||
// // showDialog(
|
|
||||||
// // context: Get.context!,
|
|
||||||
// // builder: (context) => AlertDialog(
|
|
||||||
// // title: const Text('Microphone Permission'),
|
|
||||||
// // content:
|
|
||||||
// // const Text('Microphone permission is required to record audio.'),
|
|
||||||
// // actions: [
|
|
||||||
// // TextButton(
|
|
||||||
// // onPressed: () {
|
|
||||||
// // Navigator.of(context).pop();
|
|
||||||
// // openAppSettings();
|
|
||||||
// // },
|
|
||||||
// // child: const Text('Open Settings'),
|
|
||||||
// // ),
|
|
||||||
// // TextButton(
|
|
||||||
// // onPressed: () {
|
|
||||||
// // Navigator.of(context).pop();
|
|
||||||
// // },
|
|
||||||
// // child: const Text('Cancel'),
|
|
||||||
// // ),
|
|
||||||
// // ],
|
|
||||||
// // ),
|
|
||||||
// // );
|
|
||||||
// // }
|
|
||||||
// //
|
|
||||||
// // void showPermissionDeniedSnackbar() {
|
|
||||||
// // Get.snackbar(
|
|
||||||
// // 'Microphone Permission',
|
|
||||||
// // 'Microphone permission is required to record audio.',
|
|
||||||
// // snackPosition: SnackPosition.BOTTOM,
|
|
||||||
// // duration: const Duration(seconds: 5),
|
|
||||||
// // mainButton: TextButton(
|
|
||||||
// // onPressed: () {
|
|
||||||
// // openAppSettings();
|
|
||||||
// // },
|
|
||||||
// // child: const Text(
|
|
||||||
// // 'Open Settings',
|
|
||||||
// // style: TextStyle(color: Colors.white),
|
|
||||||
// // ),
|
|
||||||
// // ),
|
|
||||||
// // );
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
// import 'package:flutter_sound/flutter_sound.dart';
|
||||||
// import 'package:get/get.dart';
|
// import 'package:get/get.dart';
|
||||||
// // import 'package:flutter_sound/flutter_sound.dart';
|
|
||||||
// import 'package:permission_handler/permission_handler.dart';
|
// import 'package:permission_handler/permission_handler.dart';
|
||||||
//
|
//
|
||||||
// class AudioController extends GetxController {
|
// import '../home/map_passenger_controller.dart';
|
||||||
// final flutterSoundHelper = FlutterSoundHelper();
|
|
||||||
//
|
//
|
||||||
|
// class AudioController extends GetxController {
|
||||||
|
// final recorder = FlutterSoundRecorder();
|
||||||
// bool isRecording = false;
|
// bool isRecording = false;
|
||||||
//
|
//
|
||||||
// Future<void> startRecording() async {
|
// @override
|
||||||
// if (!await flutterSoundHelper.hasPermissions()) {
|
// void onInit() {
|
||||||
// await flutterSoundHelper.requestPermissions();
|
// super.onInit();
|
||||||
// }
|
// initRecorder();
|
||||||
|
// }
|
||||||
//
|
//
|
||||||
// if (!await flutterSoundHelper.hasPermissions()) {
|
// Future<void> initRecorder() async {
|
||||||
|
// final status = await Permission.microphone.request();
|
||||||
|
// if (status != PermissionStatus.granted) {
|
||||||
|
// if (status.isPermanentlyDenied) {
|
||||||
|
// // Handle permission permanently denied
|
||||||
|
// showPermissionDeniedDialog();
|
||||||
|
// } else if (status.isDenied) {
|
||||||
|
// // Handle permission denied
|
||||||
|
// showPermissionDeniedSnackbar();
|
||||||
|
// } else if (status.isRestricted) {
|
||||||
|
// // Handle permission restricted
|
||||||
|
// showPermissionDeniedSnackbar();
|
||||||
|
// }
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
// await recorder.openRecorder();
|
||||||
|
// recorder.setSubscriptionDuration(const Duration(minutes: 50));
|
||||||
|
// }
|
||||||
//
|
//
|
||||||
// await flutterSoundHelper.startRecorder();
|
// Future<void> startRecording() async {
|
||||||
|
// if (!recorder.isStopped) {
|
||||||
|
// await recorder.startRecorder();
|
||||||
|
// }
|
||||||
// isRecording = true;
|
// isRecording = true;
|
||||||
|
// update();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Future<void> stopRecording() async {
|
// Future<void> stopRecording() async {
|
||||||
// if (!isRecording) {
|
// final filePath = await recorder.stopRecorder();
|
||||||
// return;
|
// final audioFile = File(filePath!);
|
||||||
// }
|
// print('Recorded file path: $audioFile');
|
||||||
//
|
// // Now you can send this file to the server
|
||||||
// await flutterSoundHelper.stopRecorder();
|
|
||||||
// isRecording = false;
|
// isRecording = false;
|
||||||
|
// update();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @override
|
||||||
|
// void onClose() {
|
||||||
|
// recorder.stopRecorder();
|
||||||
|
// super.onClose();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void showPermissionDeniedDialog() {
|
||||||
|
// showDialog(
|
||||||
|
// context: Get.context!,
|
||||||
|
// builder: (context) => AlertDialog(
|
||||||
|
// title: const Text('Microphone Permission'),
|
||||||
|
// content:
|
||||||
|
// const Text('Microphone permission is required to record audio.'),
|
||||||
|
// actions: [
|
||||||
|
// TextButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// Navigator.of(context).pop();
|
||||||
|
// openAppSettings();
|
||||||
|
// },
|
||||||
|
// child: const Text('Open Settings'),
|
||||||
|
// ),
|
||||||
|
// TextButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// Navigator.of(context).pop();
|
||||||
|
// },
|
||||||
|
// child: const Text('Cancel'),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void showPermissionDeniedSnackbar() {
|
||||||
|
// Get.snackbar(
|
||||||
|
// 'Microphone Permission',
|
||||||
|
// 'Microphone permission is required to record audio.',
|
||||||
|
// snackPosition: SnackPosition.BOTTOM,
|
||||||
|
// duration: const Duration(seconds: 5),
|
||||||
|
// mainButton: TextButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// openAppSettings();
|
||||||
|
// },
|
||||||
|
// child: const Text(
|
||||||
|
// 'Open Settings',
|
||||||
|
// style: TextStyle(color: Colors.white),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
import 'package:flutter/material.dart';
|
||||||
// class FlutterSoundHelper {
|
import 'package:flutter_sound/flutter_sound.dart';
|
||||||
// final flutterSound = FlutterSoundRecorder();
|
import 'package:get/get.dart';
|
||||||
//
|
// import 'package:flutter_sound/flutter_sound.dart';
|
||||||
// Future<bool> hasPermissions() async {
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
// return await Permission.microphone.isGranted;
|
|
||||||
// }
|
class AudioController extends GetxController {
|
||||||
//
|
final flutterSoundHelper = FlutterSoundHelper();
|
||||||
// Future<void> requestPermissions() async {
|
|
||||||
// await Permission.microphone.request();
|
bool isRecording = false;
|
||||||
// }
|
|
||||||
//
|
Future<void> startRecording() async {
|
||||||
// Future<void> startRecorder() async {
|
if (!await flutterSoundHelper.hasPermissions()) {
|
||||||
// await flutterSound.openRecorder();
|
await flutterSoundHelper.requestPermissions();
|
||||||
// await flutterSound.startRecorder(toFile: 'audio.wav');
|
}
|
||||||
// }
|
|
||||||
//
|
if (!await flutterSoundHelper.hasPermissions()) {
|
||||||
// Future<void> stopRecorder() async {
|
return;
|
||||||
// await flutterSound.stopRecorder();
|
}
|
||||||
// await flutterSound.closeRecorder();
|
|
||||||
// }
|
await flutterSoundHelper.startRecorder();
|
||||||
// }
|
isRecording = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> stopRecording() async {
|
||||||
|
if (!isRecording) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await flutterSoundHelper.stopRecorder();
|
||||||
|
isRecording = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FlutterSoundHelper {
|
||||||
|
final flutterSound = FlutterSoundRecorder();
|
||||||
|
|
||||||
|
Future<bool> hasPermissions() async {
|
||||||
|
return await Permission.microphone.isGranted;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> requestPermissions() async {
|
||||||
|
await Permission.microphone.request();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> startRecorder() async {
|
||||||
|
await flutterSound.openRecorder();
|
||||||
|
await flutterSound.startRecorder(toFile: 'audio.wav');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> stopRecorder() async {
|
||||||
|
await flutterSound.stopRecorder();
|
||||||
|
await flutterSound.closeRecorder();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -935,7 +935,7 @@ class MapPassengerController extends GetxController {
|
|||||||
box.read(BoxName.carType),
|
box.read(BoxName.carType),
|
||||||
kazan.toStringAsFixed(0),
|
kazan.toStringAsFixed(0),
|
||||||
passengerRate.toStringAsFixed(2),
|
passengerRate.toStringAsFixed(2),
|
||||||
];
|
]; //
|
||||||
print(body);
|
print(body);
|
||||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
'Order',
|
'Order',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class CallController extends GetxController {
|
|||||||
channelName = Get.find<MapDriverController>().rideId; // 'sefer300'; //
|
channelName = Get.find<MapDriverController>().rideId; // 'sefer300'; //
|
||||||
remoteUid = int.parse(Get.find<MapDriverController>().passengerPhone);
|
remoteUid = int.parse(Get.find<MapDriverController>().passengerPhone);
|
||||||
uid = int.parse(box.read(BoxName.phoneDriver));
|
uid = int.parse(box.read(BoxName.phoneDriver));
|
||||||
// initAgoraFull();
|
initAgoraFull();
|
||||||
}
|
}
|
||||||
|
|
||||||
initAgoraFull() async {
|
initAgoraFull() async {
|
||||||
@@ -36,7 +36,7 @@ class CallController extends GetxController {
|
|||||||
setupVoiceSDKEngine();
|
setupVoiceSDKEngine();
|
||||||
join();
|
join();
|
||||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||||
'Call Income'.tr,
|
'Call Income',
|
||||||
'${'You have call from driver'.tr} ${box.read(BoxName.nameDriver)}',
|
'${'You have call from driver'.tr} ${box.read(BoxName.nameDriver)}',
|
||||||
Get.find<MapDriverController>().tokenPassenger,
|
Get.find<MapDriverController>().tokenPassenger,
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ GetBuilder<HomeCaptainController> callPage() {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||||
'Call End'.tr,
|
|
||||||
'Call End',
|
'Call End',
|
||||||
|
'Call End'.tr,
|
||||||
Get.find<MapDriverController>().tokenPassenger,
|
Get.find<MapDriverController>().tokenPassenger,
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ProfileController profileController = Get.put(ProfileController());
|
ProfileController profileController = Get.put(ProfileController());
|
||||||
// AudioController audioController = Get.put(AudioController());
|
AudioController audioController = Get.put(AudioController());
|
||||||
return GetBuilder<MapPassengerController>(builder: (controller) {
|
return GetBuilder<MapPassengerController>(builder: (controller) {
|
||||||
if (controller.rideTimerBegin ||
|
if (controller.rideTimerBegin ||
|
||||||
controller.statusRide == 'Begin' && !controller.statusRideFromStart) {
|
controller.statusRide == 'Begin' && !controller.statusRideFromStart) {
|
||||||
@@ -82,29 +82,29 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
tooltip: ' Add Note', // Optional tooltip for clarity
|
tooltip: ' Add Note', // Optional tooltip for clarity
|
||||||
),
|
),
|
||||||
// audioController.isRecording == false
|
audioController.isRecording == false
|
||||||
// ? IconButton(
|
? IconButton(
|
||||||
// onPressed: () async {
|
onPressed: () async {
|
||||||
// await audioController.startRecording();
|
await audioController.startRecording();
|
||||||
// },
|
},
|
||||||
// icon: const Icon(
|
icon: const Icon(
|
||||||
// Icons.play_circle_fill_outlined,
|
Icons.play_circle_fill_outlined,
|
||||||
// color: AppColor.greenColor,
|
color: AppColor.greenColor,
|
||||||
// ),
|
),
|
||||||
// tooltip:
|
tooltip:
|
||||||
// ' Add Note', // Optional tooltip for clarity
|
' Add Note', // Optional tooltip for clarity
|
||||||
// )
|
)
|
||||||
// : IconButton(
|
: IconButton(
|
||||||
// onPressed: () async {
|
onPressed: () async {
|
||||||
// await audioController.stopRecording();
|
await audioController.stopRecording();
|
||||||
// },
|
},
|
||||||
// icon: const Icon(
|
icon: const Icon(
|
||||||
// Icons.stop_circle,
|
Icons.stop_circle,
|
||||||
// color: AppColor.greenColor,
|
color: AppColor.greenColor,
|
||||||
// ),
|
),
|
||||||
// tooltip:
|
tooltip:
|
||||||
// ' Add Note', // Optional tooltip for clarity
|
' Add Note', // Optional tooltip for clarity
|
||||||
// ),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
32
pubspec.lock
32
pubspec.lock
@@ -638,6 +638,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.0"
|
||||||
|
flutter_sound:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_sound
|
||||||
|
sha256: "090a4694b11ecc744c2010621c4ffc5fe7c3079d304ea014961a72c7b72cfe6c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.2.13"
|
||||||
|
flutter_sound_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_sound_platform_interface
|
||||||
|
sha256: "4537eaeb58a32748c42b621ad6116f7f4c6ee0a8d6ffaa501b165fe1c9df4753"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.2.13"
|
||||||
|
flutter_sound_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_sound_web
|
||||||
|
sha256: ad4ca92671a1879e1f613e900bbbdb8170b20d57d1e4e6363018fe56b055594f
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.2.13"
|
||||||
flutter_spinkit:
|
flutter_spinkit:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1280,6 +1304,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.0"
|
version: "4.2.0"
|
||||||
|
logger:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logger
|
||||||
|
sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.0"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ dependencies:
|
|||||||
vibration: ^1.8.4
|
vibration: ^1.8.4
|
||||||
wakelock_plus:
|
wakelock_plus:
|
||||||
background_location: ^0.13.0
|
background_location: ^0.13.0
|
||||||
# flutter_sound: ^9.2.13
|
flutter_sound: ^9.2.13
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user