8-18/1
This commit is contained in:
@@ -12,7 +12,7 @@ class HomePage extends StatelessWidget {
|
||||
title: 'Home Page',
|
||||
body: [
|
||||
Center(
|
||||
child: CircleContainer(
|
||||
child: MyCircleContainer(
|
||||
child: const Icon(Icons.clear),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -3,13 +3,17 @@ import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/controller/home/map_page_controller.dart';
|
||||
import 'package:ride/views/home/map_widget.dart/cancel_raide_page.dart';
|
||||
import 'package:ride/views/widgets/circle_container.dart';
|
||||
import 'package:ride/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../controller/home/menu_controller.dart';
|
||||
import 'map_widget.dart/buttom_sheet_map_show.dart';
|
||||
import 'map_widget.dart/cash_confirm_bottom_page.dart';
|
||||
import 'map_widget.dart/main_bottom_Menu_map.dart';
|
||||
import 'map_widget.dart/map_menu_widget.dart';
|
||||
import 'map_widget.dart/menu_map_page.dart';
|
||||
import 'map_widget.dart/payment_method.page.dart';
|
||||
import 'map_widget.dart/picker_animation_container.dart';
|
||||
|
||||
class MapPage extends StatelessWidget {
|
||||
@@ -153,11 +157,29 @@ class MapPage extends StatelessWidget {
|
||||
)),
|
||||
),
|
||||
const PickerIconOnMap(),
|
||||
PickerAnimtionContainerFormPlaces(),
|
||||
// MainBottomMenuMap(),
|
||||
// PickerAnimtionContainerFormPlaces(),
|
||||
MainBottomMenuMap(),
|
||||
const MapMenuWidget(),
|
||||
const MenuIconMapPageWidget(),
|
||||
buttomSheetMapPage()
|
||||
buttomSheetMapPage(),
|
||||
cancelRidePage(),
|
||||
GetBuilder<MapController>(
|
||||
builder: (controller) => controller.data.isNotEmpty
|
||||
? Positioned(
|
||||
right: 5,
|
||||
top: 55,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
controller.changeCancelRidePageShow();
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.clear,
|
||||
size: 30,
|
||||
),
|
||||
))
|
||||
: const SizedBox()),
|
||||
CashConfirmPageShown(),
|
||||
PaymentMethodPage()
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
@@ -17,7 +18,7 @@ GetBuilder<MapController> buttomSheetMapPage() {
|
||||
// clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
curve: Curves.easeInCirc,
|
||||
onEnd: () {
|
||||
controller.height = 240;
|
||||
controller.height = 250;
|
||||
},
|
||||
height: controller.heightButtomSheetShown,
|
||||
duration: const Duration(seconds: 2),
|
||||
@@ -91,55 +92,115 @@ GetBuilder<MapController> buttomSheetMapPage() {
|
||||
child: controller.data.isEmpty
|
||||
? const SizedBox()
|
||||
: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'distance is ${controller.data[0]['distance']['text']}',
|
||||
style: AppStyle.title,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.location_on,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text(
|
||||
'From : '.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
controller.data[0]['start_address']
|
||||
.toString(),
|
||||
style: AppStyle.subtitle,
|
||||
)
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.location_searching_rounded),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text(
|
||||
'To : '.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
controller.data[0]['end_address'],
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: AppColor.accentColor,
|
||||
thickness: 1,
|
||||
height: 2,
|
||||
indent: 1,
|
||||
),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12),
|
||||
// border: Border.all(),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.monetization_on,
|
||||
color: Colors.green[400],
|
||||
),
|
||||
InkWell(
|
||||
onTap: () => controller
|
||||
.changeCashConfirmPageShown(),
|
||||
child: Text(
|
||||
'CASH',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 40,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.qr_code_2_rounded,
|
||||
color: Colors.green[400],
|
||||
),
|
||||
Text(
|
||||
'Add Promo'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'duration is ${controller.data[0]['duration']['text']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'Cost for .21/km ${controller.cost.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'costDuration ${controller.averageDuration.toStringAsFixed(2)} is ${controller.costDuration.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'totalDriver ${controller.totalDriver.toStringAsFixed(2)}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'totaME ${controller.totaME.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Cost for passenger ${controller.totalPassenger.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Confirm Selection',
|
||||
onPressed: () {},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -149,3 +210,61 @@ GetBuilder<MapController> buttomSheetMapPage() {
|
||||
)
|
||||
: const SizedBox());
|
||||
}
|
||||
|
||||
class Details extends StatelessWidget {
|
||||
const Details({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'distance is ${controller.data[0]['distance']['text']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'duration is ${controller.data[0]['duration']['text']}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'Cost for .21/km ${controller.cost.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'costDuration ${controller.averageDuration.toStringAsFixed(2)} is ${controller.costDuration.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Text(
|
||||
'totalDriver ${controller.totalDriver.toStringAsFixed(2)}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'totaME ${controller.totaME.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Cost for passenger ${controller.totalPassenger.toStringAsFixed(2)} ',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
87
lib/views/home/map_widget.dart/cancel_raide_page.dart
Normal file
87
lib/views/home/map_widget.dart/cancel_raide_page.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/home/map_page_controller.dart';
|
||||
|
||||
import '../../widgets/elevated_btn.dart';
|
||||
|
||||
GetBuilder<MapController> cancelRidePage() {
|
||||
Get.put(MapController());
|
||||
final List<String> reasons = [
|
||||
"I don't need a ride anymore".tr,
|
||||
"I was just trying the application".tr,
|
||||
"No driver accepted my request".tr,
|
||||
"I added the wrong pick-up/drop-off location".tr,
|
||||
"I don't have a reason".tr,
|
||||
"Other".tr,
|
||||
];
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => controller.isCancelRidePageShown
|
||||
? Positioned(
|
||||
left: 60,
|
||||
top: 40,
|
||||
right: 60,
|
||||
// bottom: 100,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
const BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 5),
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor.withOpacity(.4),
|
||||
offset: const Offset(-2, -2),
|
||||
blurRadius: 5)
|
||||
],
|
||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
height: Get.height * .7,
|
||||
width: Get.width * .7,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Text(
|
||||
'Can we know why you want to cancel Ride ?'.tr,
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 380,
|
||||
width: 300,
|
||||
child: ListView.builder(
|
||||
itemCount: reasons.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ListTile(
|
||||
title: Text(reasons[index]),
|
||||
leading: Radio(
|
||||
value: index,
|
||||
groupValue: controller.selectedReason,
|
||||
onChanged: (int? value) {
|
||||
print(value);
|
||||
controller.selectReason(value!);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Cancel Ride'.tr,
|
||||
onPressed: () async {
|
||||
controller.cancelRide();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
);
|
||||
}
|
||||
123
lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart
Normal file
123
lib/views/home/map_widget.dart/cash_confirm_bottom_page.dart
Normal file
@@ -0,0 +1,123 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_page_controller.dart';
|
||||
|
||||
class CashConfirmPageShown extends StatelessWidget {
|
||||
const CashConfirmPageShown({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => Positioned(
|
||||
right: 5,
|
||||
bottom: 5,
|
||||
left: 5,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
height: controller.cashConfirmPageShown,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Payment Method'.tr,
|
||||
style: AppStyle.title.copyWith(fontSize: 22),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () =>
|
||||
controller.changeCashConfirmPageShown(),
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.wallet_outlined,
|
||||
size: 25,
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Ride Wallet'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
'${'Your Wallet balance is '.tr}JD 0.00',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
Checkbox.adaptive(
|
||||
value: false,
|
||||
onChanged: (value) {},
|
||||
)
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: AppColor.accentColor,
|
||||
thickness: 1,
|
||||
height: 2,
|
||||
indent: 1,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.monetization_on,
|
||||
color: Colors.green[400],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () =>
|
||||
controller.changeCashConfirmPageShown(),
|
||||
child: Text(
|
||||
'CASH',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Checkbox.adaptive(
|
||||
value: false,
|
||||
onChanged: (value) {},
|
||||
)
|
||||
],
|
||||
),
|
||||
const Divider(
|
||||
color: AppColor.accentColor,
|
||||
thickness: 1,
|
||||
height: 2,
|
||||
indent: 1,
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Add Payment Method',
|
||||
onPressed: () =>
|
||||
controller.changePaymentMethodPageShown(),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,10 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
: const SizedBox(),
|
||||
controller.isMainBottomMenuMap
|
||||
? const SizedBox()
|
||||
: Text('From : Current Location',style: AppStyle.subtitle,),
|
||||
: Text(
|
||||
'From : Current Location',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
controller.isMainBottomMenuMap
|
||||
? const SizedBox()
|
||||
: formSearchPlaces()
|
||||
@@ -101,96 +104,102 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
}
|
||||
|
||||
class FavioratePlacesDialogu extends StatelessWidget {
|
||||
FavioratePlacesDialogu({
|
||||
const FavioratePlacesDialogu({
|
||||
super.key,
|
||||
});
|
||||
final controller = MapController();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
child: Center(
|
||||
child: AnimatedTextKit(
|
||||
animatedTexts: [
|
||||
TypewriterAnimatedText('Favorite Places'.tr),
|
||||
ScaleAnimatedText(
|
||||
'Favorite Places'.tr,
|
||||
),
|
||||
TyperAnimatedText(
|
||||
'Favorite Places'.tr,
|
||||
),
|
||||
],
|
||||
isRepeatingAnimation: true,
|
||||
onTap: () async {
|
||||
List favoritePlaces =
|
||||
await sql.getAllData(TableName.placesFavorite);
|
||||
print(favoritePlaces);
|
||||
Get.defaultDialog(
|
||||
title: 'Favorite Places'.tr,
|
||||
content: SizedBox(
|
||||
width: Get.width * .8,
|
||||
height: 300,
|
||||
child: favoritePlaces.isEmpty
|
||||
? Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.hourglass_empty_rounded,
|
||||
size: 99,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
Text(
|
||||
'You Dont Have Any places yet !'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: favoritePlaces.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await controller.getMap(
|
||||
'${controller.mylocation.latitude},${controller.mylocation.longitude}',
|
||||
'${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}',
|
||||
);
|
||||
controller.changePickerShown();
|
||||
controller.changeButtomSheetShown();
|
||||
controller.bottomSheet();
|
||||
Get.back();
|
||||
},
|
||||
child: Text(
|
||||
favoritePlaces[index]['name'],
|
||||
style: AppStyle.title,
|
||||
Get.put(MapController());
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
child: Center(
|
||||
child: AnimatedTextKit(
|
||||
animatedTexts: [
|
||||
TypewriterAnimatedText('Favorite Places'.tr),
|
||||
ScaleAnimatedText(
|
||||
'Favorite Places'.tr,
|
||||
),
|
||||
TyperAnimatedText(
|
||||
'Favorite Places'.tr,
|
||||
),
|
||||
],
|
||||
isRepeatingAnimation: true,
|
||||
onTap: () async {
|
||||
List favoritePlaces =
|
||||
await sql.getAllData(TableName.placesFavorite);
|
||||
print(favoritePlaces);
|
||||
Get.defaultDialog(
|
||||
title: 'Favorite Places'.tr,
|
||||
content: SizedBox(
|
||||
width: Get.width * .8,
|
||||
height: 300,
|
||||
child: favoritePlaces.isEmpty
|
||||
? Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.hourglass_empty_rounded,
|
||||
size: 99,
|
||||
color: AppColor.primaryColor,
|
||||
),
|
||||
Text(
|
||||
'You Dont Have Any places yet !'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await sql.deleteData(TableName.placesFavorite,
|
||||
favoritePlaces[index]['id']);
|
||||
Get.back();
|
||||
Get.snackbar('Deleted ',
|
||||
'You are Delete ${favoritePlaces[index]['name']} from your list',
|
||||
backgroundColor: AppColor.accentColor);
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: favoritePlaces.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
await controller.getMap(
|
||||
'${controller.mylocation.latitude},${controller.mylocation.longitude}',
|
||||
'${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}',
|
||||
);
|
||||
controller.changePickerShown();
|
||||
controller.changeButtomSheetShown();
|
||||
controller.bottomSheet();
|
||||
Get.back();
|
||||
},
|
||||
child: Text(
|
||||
favoritePlaces[index]['name'],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await sql.deleteData(
|
||||
TableName.placesFavorite,
|
||||
favoritePlaces[index]['id']);
|
||||
Get.back();
|
||||
Get.snackbar('Deleted ',
|
||||
'You are Delete ${favoritePlaces[index]['name']} from your list',
|
||||
backgroundColor:
|
||||
AppColor.accentColor);
|
||||
},
|
||||
icon:
|
||||
const Icon(Icons.favorite_outlined),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.favorite_outlined),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'Back'.tr, onPressed: () => Get.back()),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'Back'.tr, onPressed: () => Get.back()),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
87
lib/views/home/map_widget.dart/payment_method.page.dart
Normal file
87
lib/views/home/map_widget.dart/payment_method.page.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/map_page_controller.dart';
|
||||
|
||||
class PaymentMethodPage extends StatelessWidget {
|
||||
const PaymentMethodPage({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => Positioned(
|
||||
right: 5,
|
||||
bottom: 5,
|
||||
left: 5,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
height: controller.paymentPageShown,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'My Cared'.tr,
|
||||
style: AppStyle.title.copyWith(fontSize: 22),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () =>
|
||||
controller.changePaymentMethodPageShown(),
|
||||
icon: const Icon(Icons.close),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'Add Card'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
height: Get.height * .3,
|
||||
decoration: const BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
spreadRadius: 3,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 3,
|
||||
color: AppColor.redColor),
|
||||
BoxShadow(
|
||||
offset: Offset(-3, -3),
|
||||
blurRadius: 3,
|
||||
spreadRadius: 3,
|
||||
color: AppColor.redColor)
|
||||
]),
|
||||
),
|
||||
const Spacer(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Add Credit Card',
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user