11/13/1
This commit is contained in:
@@ -39,7 +39,7 @@ class HomePage extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
child: ListTile(
|
||||
onTap: () {
|
||||
Get.to(() => Language());
|
||||
Get.to(() => const Language());
|
||||
},
|
||||
title: Text(
|
||||
'Language'.tr,
|
||||
|
||||
@@ -21,8 +21,8 @@ import 'map_widget.dart/payment_method.page.dart';
|
||||
import 'map_widget.dart/timer_for_cancell_trip_from_passenger.dart';
|
||||
import 'map_widget.dart/timer_to_passenger_from_driver.dart';
|
||||
|
||||
class MapPage extends StatelessWidget {
|
||||
const MapPage({super.key});
|
||||
class MapPagePassenger extends StatelessWidget {
|
||||
const MapPagePassenger({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -49,48 +49,66 @@ GetBuilder<MapPassengerController> buttomSheetMapPage() {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/jeep.png',
|
||||
width: 50,
|
||||
fit: BoxFit.fill,
|
||||
repeat: ImageRepeat.repeatX,
|
||||
SizedBox(
|
||||
width: Get.width * .15,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/jeep.png',
|
||||
width: 50,
|
||||
fit: BoxFit.fill,
|
||||
repeat: ImageRepeat.repeatX,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${'Your Ride Duration is '.tr}${controller.duration} minutes'),
|
||||
Text(
|
||||
'${'You will be thier in'.tr} ${DateFormat('h:mm a').format(controller.newTime)}'),
|
||||
Text(
|
||||
'${'You trip distance is'.tr} ${controller.distance} KM')
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 5, left: 5),
|
||||
SizedBox(
|
||||
width: Get.width * .55,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
CrossAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Text(
|
||||
'${'Fee is'.tr} \n${controller.totalPassenger.toStringAsFixed(2)}',
|
||||
'${'Your Ride Duration is '.tr}${controller.duration} minutes',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
controller.promoTaken
|
||||
? const Icon(
|
||||
Icons.filter_vintage_rounded,
|
||||
color: AppColor.redColor,
|
||||
)
|
||||
: const SizedBox(
|
||||
height: 0,
|
||||
)
|
||||
Text(
|
||||
'${'You will be thier in'.tr} ${DateFormat('h:mm a').format(controller.newTime)}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'${'You trip distance is'.tr} ${controller.distance} KM',
|
||||
style: AppStyle.subtitle,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: Get.width * .2,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 5, left: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'${'Fee is'.tr} \n${controller.totalPassenger.toStringAsFixed(2)}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
controller.promoTaken
|
||||
? const Icon(
|
||||
Icons.filter_vintage_rounded,
|
||||
color: AppColor.redColor,
|
||||
)
|
||||
: const SizedBox(
|
||||
height: 0,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -95,22 +95,48 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Nearest Car for you about '.tr),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
controller.noCarString == false
|
||||
? Text(
|
||||
'Nearest Car for you about '.tr)
|
||||
: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(12),
|
||||
color: AppColor.redColor,
|
||||
width: 3)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
(controller.nearestCar != null
|
||||
? controller
|
||||
.durationByPassenger
|
||||
.toString()
|
||||
: 'N/A')),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(6),
|
||||
child: Text(
|
||||
'No Car in your site. Sorry!'
|
||||
.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(
|
||||
color: AppColor
|
||||
.secondaryColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
controller.noCarString == false
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color:
|
||||
AppColor.redColor,
|
||||
width: 3)),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(4),
|
||||
child: Text((controller
|
||||
.nearestCar !=
|
||||
null
|
||||
? controller
|
||||
.durationByPassenger
|
||||
.toString()
|
||||
: 'N/A')),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
@@ -3,8 +3,10 @@ import 'package:get/get.dart';
|
||||
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
|
||||
import 'package:ride/views/home/profile/feed_back_page.dart';
|
||||
import 'package:ride/views/home/profile/order_history.dart';
|
||||
import 'package:ride/views/home/profile/promos_passenger_page.dart';
|
||||
import 'package:ride/views/home/profile/taarif_page.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
@@ -120,7 +122,9 @@ class MapMenuWidget extends StatelessWidget {
|
||||
icon: Icons.history,
|
||||
),
|
||||
IconMainPageMap(
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Get.to(() => const TaarifPage());
|
||||
},
|
||||
title: 'Tariff',
|
||||
icon: Icons.money,
|
||||
),
|
||||
@@ -160,7 +164,9 @@ class MapMenuWidget extends StatelessWidget {
|
||||
icon: Icons.settings,
|
||||
),
|
||||
IconMainPageMap(
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Get.to(() => FeedBackPage());
|
||||
},
|
||||
title: 'Feed Back',
|
||||
icon: Icons.feedback,
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/views/home/map_page.dart';
|
||||
import 'package:ride/views/home/map_page_passenger.dart';
|
||||
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
|
||||
@@ -328,12 +328,20 @@ class PassengerWallet extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Pay with Credit Card'.tr,
|
||||
onPressed: () => controller.makePaymentStripe(
|
||||
controller.selectedAmount as int,
|
||||
'USD',
|
||||
() => Get.snackbar('Hi', '')),
|
||||
),
|
||||
title: 'Pay with Credit Card'.tr,
|
||||
onPressed: () {
|
||||
if (controller.selectedAmount != 0) {
|
||||
controller.makePaymentStripe(
|
||||
controller.selectedAmount as int,
|
||||
'USD',
|
||||
() => Get.snackbar('Hi', ''));
|
||||
} else {
|
||||
Toast.show(
|
||||
context,
|
||||
'You will choose one of above !'.tr,
|
||||
AppColor.redColor);
|
||||
}
|
||||
}),
|
||||
MyElevatedButton(
|
||||
title: 'Cancel'.tr,
|
||||
kolor: AppColor.redColor,
|
||||
|
||||
60
lib/views/home/profile/feed_back_page.dart
Normal file
60
lib/views/home/profile/feed_back_page.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/controller/home/profile/feed_back_controller.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
import 'package:ride/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../widgets/elevated_btn.dart';
|
||||
|
||||
class FeedBackPage extends StatelessWidget {
|
||||
FeedBackPage({super.key});
|
||||
FeedBackController feedBackController = Get.put(FeedBackController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(
|
||||
title: 'Feed Back'.tr,
|
||||
body: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(26),
|
||||
child: Form(
|
||||
key: feedBackController.formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
TextFormField(
|
||||
controller: feedBackController.feedbackController,
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter your feedback here',
|
||||
labelText: 'Feedback',
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter your feedback.';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
feedBackController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: MyElevatedButton(
|
||||
onPressed: () {
|
||||
if (feedBackController.formKey.currentState!
|
||||
.validate()) {
|
||||
feedBackController.addFeedBack();
|
||||
|
||||
// Clear the feedback form
|
||||
feedBackController.formKey.currentState!.reset();
|
||||
}
|
||||
},
|
||||
title: 'Submit Feedback'.tr,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
isleading: true,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ class PromosPassengerPage extends StatelessWidget {
|
||||
isleading: true,
|
||||
body: [
|
||||
GetBuilder<PromosController>(
|
||||
builder: (orderHistoryController) => orderHistoryController.isloading
|
||||
builder: (orderHistoryController) => orderHistoryController.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: ListView.builder(
|
||||
itemCount: orderHistoryController.promoList.length,
|
||||
|
||||
73
lib/views/home/profile/taarif_page.dart
Normal file
73
lib/views/home/profile/taarif_page.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
|
||||
class TaarifPage extends StatelessWidget {
|
||||
const TaarifPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(isleading: true, title: 'Tariffs'.tr, body: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Table(
|
||||
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||
border: TableBorder.symmetric(),
|
||||
textBaseline: TextBaseline.alphabetic,
|
||||
children: [
|
||||
TableRow(
|
||||
// decoration: AppStyle.boxDecoration,
|
||||
children: [
|
||||
Text('Minimum fare'.tr, style: AppStyle.title),
|
||||
Text('1 USD', style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
Text('Maximum fare'.tr, style: AppStyle.title),
|
||||
Text('200 USD', style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
Text('Flag-down fee'.tr, style: AppStyle.title),
|
||||
Text('0.47 USD', style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
Text('0.05 USD/min and 0.21 USD/km', style: AppStyle.title),
|
||||
Text('Including Tax', style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text('BookingFee'.tr, style: AppStyle.headtitle2),
|
||||
const SizedBox(height: 10),
|
||||
Text('4.17%', style: AppStyle.title),
|
||||
const SizedBox(height: 20),
|
||||
Text('Morning', style: AppStyle.headtitle2),
|
||||
const SizedBox(height: 10),
|
||||
Text('from 07:30 till 10:30 (Thursday, Friday, Saturday, Monday)',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 20),
|
||||
Text('Evening', style: AppStyle.headtitle2),
|
||||
const SizedBox(height: 10),
|
||||
Text('from 12:00 till 15:00 (Thursday, Friday, Saturday, Monday)',
|
||||
style: AppStyle.title),
|
||||
const SizedBox(height: 20),
|
||||
Text('Night', style: AppStyle.headtitle2),
|
||||
const SizedBox(height: 10),
|
||||
Text('from 23:59 till 05:30', style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../controller/local/local_controller.dart';
|
||||
import '../auth/login_page.dart';
|
||||
import '../home/map_page.dart';
|
||||
import '../home/map_page_passenger.dart';
|
||||
|
||||
class Language extends StatelessWidget {
|
||||
const Language({Key? key}) : super(key: key);
|
||||
@@ -31,7 +31,7 @@ class Language extends StatelessWidget {
|
||||
onPressed: () {
|
||||
controller.changeLang("ar");
|
||||
box.read(BoxName.email) != null
|
||||
? Get.offAll(() => const MapPage())
|
||||
? Get.offAll(() => const MapPagePassenger())
|
||||
: Get.offAll(() => LoginPage());
|
||||
},
|
||||
),
|
||||
@@ -40,7 +40,7 @@ class Language extends StatelessWidget {
|
||||
onPressed: () {
|
||||
controller.changeLang("en");
|
||||
box.read(BoxName.email) != null
|
||||
? Get.offAll(() => const MapPage())
|
||||
? Get.offAll(() => const MapPagePassenger())
|
||||
: Get.offAll(() => LoginPage());
|
||||
},
|
||||
),
|
||||
@@ -49,7 +49,7 @@ class Language extends StatelessWidget {
|
||||
onPressed: () {
|
||||
controller.changeLang("tr");
|
||||
box.read(BoxName.email) != null
|
||||
? Get.offAll(() => const MapPage())
|
||||
? Get.offAll(() => const MapPagePassenger())
|
||||
: Get.offAll(() => LoginPage());
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user