This commit is contained in:
Hamza-Ayed
2024-02-06 10:43:14 +03:00
parent a34c2d9eda
commit 4ee10218a9
9 changed files with 110 additions and 10 deletions

View File

@@ -207,8 +207,13 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
controller.changePickerShown();
}));
},
child: Text(
'Work : ${box.read(BoxName.addWork) == 'addWork' ? 'Add Work' : box.read(BoxName.addWork).toString().split(',')[0] + box.read(BoxName.addWork).toString().split(',')[1]} '),
child: Container(
decoration: BoxDecoration(
color: AppColor.greenColor.withOpacity(.4),
border: Border.all()),
child: Text(
'Work : ${box.read(BoxName.addWork) == 'addWork' ? 'Add Work' : box.read(BoxName.addWork).toString().split(',')[0] + box.read(BoxName.addWork).toString().split(',')[1]} '),
),
),
InkWell(
onLongPress: () {
@@ -243,8 +248,13 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
controller.update();
}
},
child: Text(
'Home : ${box.read(BoxName.addHome) == 'addHome' ? 'Add Home' : box.read(BoxName.addHome)} '),
child: Container(
decoration: BoxDecoration(
color: AppColor.yellowColor.withOpacity(.4),
border: Border.all()),
child: Text(
'Home : ${box.read(BoxName.addHome) == 'addHome' ? 'Add Home' : box.read(BoxName.addHome)} '),
),
),
],
),

View File

@@ -5,6 +5,7 @@ import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../constant/colors.dart';
import '../../../controller/functions/tts.dart';
import '../../../controller/home/map_passenger_controller.dart';
GetBuilder<MapPassengerController> leftMainMenuIcons() {
@@ -56,7 +57,27 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
const SizedBox(
height: 5,
),
// if (Platform.isIOS)
if (Platform.isIOS)
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.mapController?.animateCamera(
CameraUpdate.newLatLng(LatLng(
controller.passengerLocation.latitude,
controller.passengerLocation.longitude)));
},
icon: const Icon(
Icons.location_on,
size: 29,
),
),
),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
@@ -66,13 +87,12 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () {
controller.mapController?.animateCamera(
CameraUpdate.newLatLng(LatLng(
controller.passengerLocation.latitude,
controller.passengerLocation.longitude)));
final _textToSpeech = TextToSpeech();
_textToSpeech.initTts();
_textToSpeech.speakText("Hello, world!");
},
icon: const Icon(
Icons.location_on,
Icons.voice_chat,
size: 29,
),
),