6/27/1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/home_page_controller.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -19,6 +20,7 @@ class HomePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(HomePageController());
|
||||
return MyScafolld(
|
||||
isleading: true,
|
||||
title: 'Home Page'.tr,
|
||||
@@ -74,6 +76,25 @@ class HomePage extends StatelessWidget {
|
||||
),
|
||||
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.vibration),
|
||||
title: GetBuilder<HomePageController>(builder: (controller) {
|
||||
return SwitchListTile(
|
||||
title: Text(
|
||||
'Vibration'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
),
|
||||
value: controller.isVibrate,
|
||||
onChanged: controller.changeVibrateOption,
|
||||
activeColor: AppColor.primaryColor,
|
||||
);
|
||||
}),
|
||||
subtitle: Text(
|
||||
'You can change the Vibration for all butttons'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
onTap: () => Get.to(() => const FrequentlyQuestionsPage()),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.record_voice_over_outlined),
|
||||
title: Text(
|
||||
|
||||
@@ -615,9 +615,13 @@ class HeaderDestination extends StatelessWidget {
|
||||
'🟢 ',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
mapPassengerController.startNameAddress,
|
||||
style: AppStyle.subtitle,
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
mapPassengerController.startNameAddress,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -629,9 +633,13 @@ class HeaderDestination extends StatelessWidget {
|
||||
'🔴 ',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
mapPassengerController.endNameAddress,
|
||||
style: AppStyle.subtitle,
|
||||
SizedBox(
|
||||
height: Get.height * .06,
|
||||
width: Get.width * .8,
|
||||
child: Text(
|
||||
mapPassengerController.endNameAddress,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -71,7 +71,8 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
decoration: AppStyle.boxDecoration1
|
||||
.copyWith(color: AppColor.blueColor),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
controller.changeMainBottomMenuMap();
|
||||
@@ -81,8 +82,11 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20, vertical: 4),
|
||||
child: Text(
|
||||
'Pick from map'.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
controller.isAnotherOreder
|
||||
? 'Pick from map destination'.tr
|
||||
: 'Pick from map'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.secondaryColor),
|
||||
),
|
||||
),
|
||||
)),
|
||||
@@ -144,13 +148,14 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
||||
child: Container(
|
||||
width: Get.width * .25,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.greenColor.withOpacity(.4),
|
||||
color: AppColor.blueColor.withOpacity(.4),
|
||||
border: Border.all()),
|
||||
child: Text(
|
||||
' ${box.read(BoxName.addWork)}' == 'addWork'
|
||||
? 'Add Work'.tr
|
||||
: 'Work'.tr,
|
||||
: 'To Work'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -208,11 +213,12 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
|
||||
child: Container(
|
||||
width: Get.width * .25,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.yellowColor.withOpacity(.4),
|
||||
color: AppColor.blueColor.withOpacity(.4),
|
||||
border: Border.all()),
|
||||
child: Text(
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
'${box.read(BoxName.addHome) == 'addHome' ? 'Add Home' : 'Home'} '),
|
||||
'${box.read(BoxName.addHome) == 'addHome' ? 'Add Home'.tr : "To Home".tr} '),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
@@ -12,6 +13,7 @@ import '../../../constant/colors.dart';
|
||||
import '../../../constant/table_names.dart';
|
||||
import '../../../controller/functions/toast.dart';
|
||||
import '../../../controller/functions/tts.dart';
|
||||
import 'form_search_start.dart';
|
||||
|
||||
class MainBottomMenuMap extends StatelessWidget {
|
||||
const MainBottomMenuMap({super.key});
|
||||
@@ -43,9 +45,28 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
child: Container(
|
||||
width: Get.width * .8,
|
||||
height: Get.height * .1,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
decoration: const BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromARGB(
|
||||
255, 237, 230, 230),
|
||||
blurRadius: 5,
|
||||
offset: Offset(2, 4)),
|
||||
BoxShadow(
|
||||
color: Color.fromARGB(
|
||||
255, 242, 237, 237),
|
||||
blurRadius: 5,
|
||||
offset: Offset(-2, -2))
|
||||
],
|
||||
color: AppColor.blueColor,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.elliptical(15, 30),
|
||||
),
|
||||
),
|
||||
// decoration: AppStyle.boxDecoration1,
|
||||
child: DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.secondaryColor),
|
||||
child: Center(
|
||||
child: controller.isPickerShown
|
||||
? clickPointPosition(
|
||||
@@ -62,6 +83,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
icon: controller.isMainBottomMenuMap
|
||||
? const Icon(
|
||||
Icons.ads_click,
|
||||
color: AppColor.secondaryColor,
|
||||
size: 35,
|
||||
)
|
||||
: const Icon(
|
||||
@@ -88,10 +110,9 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? const SizedBox()
|
||||
: Column(
|
||||
children: [
|
||||
// controller.currentLocationToFormPlaces
|
||||
// ? const SizedBox()
|
||||
// :
|
||||
// formSearchPlacesStart(),
|
||||
!controller.isAnotherOreder
|
||||
? const SizedBox()
|
||||
: formSearchPlacesStart(),
|
||||
formSearchPlacesDestenation(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
@@ -117,16 +138,81 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
// controller.showBottomSheet1();
|
||||
// }),
|
||||
//todo If you want add stop click here
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// controller.changeMainBottomMenuMap();
|
||||
// controller.changeWayPointSheet();
|
||||
// },
|
||||
// child: Text(
|
||||
// "If you want add stop click here".tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
|
||||
CupertinoButton(
|
||||
child: Text(
|
||||
!controller.isAnotherOreder
|
||||
? 'I want to order for someone else'
|
||||
.tr
|
||||
: 'I want to order for myself'.tr,
|
||||
),
|
||||
onPressed: () {
|
||||
showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (BuildContext context) =>
|
||||
CupertinoActionSheet(
|
||||
title: Text('Select Order Type'.tr),
|
||||
message: Text(
|
||||
'Choose who this order is for'
|
||||
.tr),
|
||||
actions: <Widget>[
|
||||
CupertinoActionSheetAction(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
CupertinoIcons.person,
|
||||
color: CupertinoColors
|
||||
.activeBlue),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
'I want to order for myself'
|
||||
.tr),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
controller
|
||||
.changeisAnotherOreder(
|
||||
false);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
CupertinoIcons.person_2,
|
||||
color: CupertinoColors
|
||||
.activeBlue),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
'I want to order for someone else'
|
||||
.tr),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
controller
|
||||
.changeisAnotherOreder(
|
||||
true);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
cancelButton:
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text('Cancel'.tr),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
@@ -199,6 +285,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
onPressed: () async {
|
||||
controller.clearPolyline();
|
||||
controller.data = [];
|
||||
//todo add isAnothorOrder
|
||||
if (controller.passengerStartLocationFromMap == true) {
|
||||
controller.newMyLocation = controller.newStartPointLocation;
|
||||
controller.changeMainBottomMenuMap();
|
||||
@@ -253,21 +340,24 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
controller.changeMainBottomMenuMap();
|
||||
controller.passengerStartLocationFromMap = true;
|
||||
controller.isPickerShown = true;
|
||||
await controller.mapController?.animateCamera(CameraUpdate.newLatLng(
|
||||
LatLng(controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
Get.defaultDialog(
|
||||
title: 'Destination selected'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Text(
|
||||
'Now select start pick'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
if (controller.isAnotherOreder == false) {
|
||||
await controller.mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(LatLng(
|
||||
controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
Get.defaultDialog(
|
||||
title: 'Destination selected'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Text(
|
||||
'Now select start pick'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
} else {}
|
||||
}
|
||||
|
||||
controller.placesDestination = [];
|
||||
@@ -289,6 +379,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? const Icon(
|
||||
Icons.arrow_circle_up_rounded,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)
|
||||
: const Icon(
|
||||
Icons.arrow_circle_down_rounded,
|
||||
@@ -300,7 +391,10 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? 'Pick or Tap to confirm'.tr
|
||||
// ? 'Pick your ride location on the map - Tap to confirm'.tr
|
||||
: "Click here point".tr,
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.secondaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -318,6 +412,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
icon: controller.isMainBottomMenuMap
|
||||
? const Icon(
|
||||
Icons.ads_click,
|
||||
color: AppColor.secondaryColor,
|
||||
size: 35,
|
||||
)
|
||||
: const Icon(
|
||||
|
||||
@@ -37,7 +37,8 @@ class MapMenuWidget extends StatelessWidget {
|
||||
opacity: 1, // Adjust the opacity value as needed
|
||||
child: AnimatedContainer(
|
||||
width: Get.width * .6,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
decoration: AppStyle.boxDecoration
|
||||
.copyWith(color: AppColor.blueColor),
|
||||
transform: Matrix4.translationValues(
|
||||
controller.heightMenu * .1, 1, 1),
|
||||
curve: Curves.easeOutCubic,
|
||||
@@ -85,28 +86,11 @@ class MapMenuWidget extends StatelessWidget {
|
||||
),
|
||||
Positioned(
|
||||
right: 5,
|
||||
top: 110,
|
||||
top: 80,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(-3, -3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer),
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer)
|
||||
]),
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: controller.widthMenu,
|
||||
height: Get.height * .3,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
@@ -136,26 +120,10 @@ class MapMenuWidget extends StatelessWidget {
|
||||
)),
|
||||
Positioned(
|
||||
left: 5,
|
||||
top: 110,
|
||||
top: 80,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(-3, -3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer),
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer)
|
||||
]),
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: controller.widthMenu,
|
||||
height: Get.height * .3,
|
||||
child: Column(
|
||||
@@ -225,35 +193,21 @@ class IconMainPageMap extends StatelessWidget {
|
||||
builder: (context, snapshot) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Container(
|
||||
width: double.maxFinite,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(16)),
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer,
|
||||
child: SizedBox(
|
||||
height: Get.height * .1,
|
||||
width: double.maxFinite,
|
||||
// decoration: AppStyle.boxDecoration,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(icon),
|
||||
Text(
|
||||
title.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(icon),
|
||||
Text(
|
||||
title.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/views/home/profile/complaint_page.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
Reference in New Issue
Block a user