This commit is contained in:
Hamza-Ayed
2024-06-25 15:04:31 +03:00
parent 2d83f0a45e
commit ce2dfa2ff4
18 changed files with 157 additions and 218 deletions

View File

@@ -1,12 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/info.dart';
import 'package:SEFER/controller/payment/payment_controller.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import '../../../constant/colors.dart';
import '../../../constant/style.dart';
import '../../../controller/home/map_passenger_controller.dart';

View File

@@ -582,7 +582,9 @@ class HeaderDestination extends StatelessWidget {
right: 5,
child: Container(
decoration: AppStyle.boxDecoration1,
height: Get.height * .2,
height: box.read(BoxName.countryCode) == 'Egypt'
? Get.height * .2
: Get.height * .14,
width: Get.width * .8,
child: InkWell(
onTap: () {
@@ -598,18 +600,40 @@ class HeaderDestination extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: SizedBox(
height: Get.height * .12,
height: box.read(BoxName.countryCode) == 'Egypt'
? Get.height * .14
: Get.height * .06,
child: ListView(
// crossAxisAlignment: CrossAxisAlignment.start,
//
children: [
Text(
'🟢 ${mapPassengerController.startNameAddress}',
style: AppStyle.subtitle,
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'🟢 ',
style: AppStyle.subtitle,
),
Text(
mapPassengerController.startNameAddress,
style: AppStyle.subtitle,
),
],
),
Text(
'🔴 ${mapPassengerController.endNameAddress}',
style: AppStyle.subtitle,
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'🔴 ',
style: AppStyle.subtitle,
),
Text(
mapPassengerController.endNameAddress,
style: AppStyle.subtitle,
),
],
),
],
),
@@ -618,7 +642,7 @@ class HeaderDestination extends StatelessWidget {
Row(
children: [
Text(
'📍 ${mapPassengerController.distance} ${'KM'.tr}${mapPassengerController.hours > 0 ? '${'Your Ride Duration is '.tr}${mapPassengerController.hours} ${'H and'.tr} ${mapPassengerController.minutes} ${'m'.tr}' : '${'Your Ride Duration is '.tr} ${mapPassengerController.minutes} m'}',
'📍 ${mapPassengerController.distance} ${'KM'.tr}${mapPassengerController.hours > 0 ? '${'Your Ride Duration is '.tr}${mapPassengerController.hours} ${'H and'.tr} ${mapPassengerController.minutes} ${'m'.tr}' : '${'Your Ride Duration is '.tr} ${mapPassengerController.minutes} ${'m'.tr}'}',
style: AppStyle.subtitle,
),
],

View File

@@ -102,26 +102,26 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
// ),
// ),
// ),
AnimatedContainer(
duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration(
color: AppColor.secondaryColor,
border: Border.all(),
borderRadius: BorderRadius.circular(15)),
child: IconButton(
onPressed: () async {
var phone = box.read(BoxName.countryCode) == 'Egypt'
? '+2${box.read(BoxName.sosPhonePassenger)}'
: '+962${box.read(BoxName.sosPhonePassenger)}';
controller.sendWhatsapp(phone);
},
icon: const Icon(
Icons.chat,
size: 29,
),
),
),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// var phone = box.read(BoxName.countryCode) == 'Egypt'
// ? '+2${box.read(BoxName.sosPhonePassenger)}'
// : '+962${box.read(BoxName.sosPhonePassenger)}';
// controller.sendWhatsapp(phone);
// },
// icon: const Icon(
// Icons.chat,
// size: 29,
// ),
// ),
// ),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,

View File

@@ -25,12 +25,6 @@ class MainBottomMenuMap extends StatelessWidget {
left: 5,
right: 5,
child: GestureDetector(
onVerticalDragUpdate: (DragUpdateDetails details) {
// Update the size of the GestureDetector based on the user's finger position.
// _height = details.globalPosition.dy;
controller.changeMainBottomMenuMap();
},
child: AnimatedContainer(
duration: const Duration(milliseconds: 500),
height: controller.mainBottomMenuMapHeight,

View File

@@ -175,8 +175,8 @@ class MapMenuWidget extends StatelessWidget {
return;
}
if (await canLaunch(driverAppUrl)) {
await launch(driverAppUrl);
if (await canLaunchUrl(Uri.parse(driverAppUrl))) {
await launchUrl(Uri.parse(driverAppUrl));
} else {
throw 'Could not launch app store URL';
}

View File

@@ -35,16 +35,26 @@ class PointsCaptain extends StatelessWidget {
height: Get.width * .29,
margin: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: kolor,
gradient: LinearGradient(
colors: [
kolor.withOpacity(0.3),
kolor,
kolor.withOpacity(0.7),
kolor,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
border: Border.all(color: AppColor.accentColor),
borderRadius: BorderRadius.circular(12),
shape: BoxShape.rectangle,
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
'$countPoint ${'Point'.tr}',
'$countPoint ${'LE'.tr}',
style: AppStyle.subtitle,
),
Text(

View File

@@ -47,7 +47,7 @@ class PromosPassengerPage extends StatelessWidget {
scrollDirection: Axis.horizontal,
children: [
PointsCaptain(
kolor: AppColor.blueColor,
kolor: AppColor.greyColor,
pricePoint:
box.read(BoxName.countryCode) ==
'Jordan'
@@ -60,7 +60,7 @@ class PromosPassengerPage extends StatelessWidget {
: '100',
),
PointsCaptain(
kolor: Colors.green,
kolor: AppColor.bronze,
pricePoint:
box.read(BoxName.countryCode) ==
'Jordan'
@@ -73,7 +73,7 @@ class PromosPassengerPage extends StatelessWidget {
: '210',
),
PointsCaptain(
kolor: Colors.amberAccent,
kolor: AppColor.goldenBronze,
pricePoint:
box.read(BoxName.countryCode) ==
'Jordan'
@@ -86,7 +86,7 @@ class PromosPassengerPage extends StatelessWidget {
: '450',
),
PointsCaptain(
kolor: AppColor.yellowColor,
kolor: AppColor.gold,
pricePoint:
box.read(BoxName.countryCode) ==
'Jordan'