6/15/1
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/captin/speed_map_controller.dart';
|
||||
import 'package:SEFER/views/home/Captin/mapDriverWidgets/speed_google_map.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../../controller/functions/location_controller.dart';
|
||||
import '../../Rate/rate_passenger.dart';
|
||||
import 'mapDriverWidgets/driver_end_ride_bar.dart';
|
||||
import 'mapDriverWidgets/google_driver_map_page.dart';
|
||||
import 'mapDriverWidgets/google_map_app.dart';
|
||||
import 'mapDriverWidgets/passenger_info_window.dart';
|
||||
import 'mapDriverWidgets/sos_connect.dart';
|
||||
|
||||
class DriverSpeedLocationMapPage extends StatelessWidget {
|
||||
DriverSpeedLocationMapPage({super.key});
|
||||
final LocationController locationController = Get.put(LocationController());
|
||||
// final MapDriverController mapDriverController =
|
||||
// Get.put(MapDriverController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(SpeedMapController())
|
||||
.startTimerToShowPassengerInfoWindowFromDriver();
|
||||
Get.find<SpeedMapController>().argumentLoading();
|
||||
Get.put(MapDriverController());
|
||||
|
||||
return MyScafolld(
|
||||
title: 'Map Passenger'.tr,
|
||||
body: [
|
||||
SpeedGoogleDriverMap(locationController: locationController),
|
||||
const PassengerInfoWindow(),
|
||||
driverEndRideBar(),
|
||||
const SosConnect(),
|
||||
speedCircle(),
|
||||
const GoogleMapApp(),
|
||||
const PricesWindow(),
|
||||
],
|
||||
isleading: false);
|
||||
}
|
||||
}
|
||||
|
||||
class PricesWindow extends StatelessWidget {
|
||||
const PricesWindow({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapDriverController>(builder: (mapDriverController) {
|
||||
return mapDriverController.isPriceWindow
|
||||
? Positioned(
|
||||
bottom: Get.height * 1.2,
|
||||
// top: Get.height * 3,
|
||||
left: Get.height * 1,
|
||||
right: Get.height * 1,
|
||||
child: Container(
|
||||
height: Get.height * 3,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: Text(
|
||||
'Total Price is '.tr,
|
||||
style: AppStyle.headTitle2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'ok'.tr,
|
||||
onPressed: () =>
|
||||
Get.to(() => RatePassenger(), arguments: {
|
||||
'rideId': mapDriverController.rideId,
|
||||
'passengerId': mapDriverController.passengerId,
|
||||
'driverId': mapDriverController.driverId
|
||||
}))
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/home/Captin/driver_map_page.dart';
|
||||
import 'package:SEFER/views/home/Captin/driver_map_speed.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -157,27 +156,24 @@ GetBuilder<HomeCaptainController> leftMainMenuCaptainIcons() {
|
||||
),
|
||||
),
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(color: AppColor.blueColor),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
// Get.to(() => PassengerLocationMapPage(),
|
||||
// arguments: box.read(BoxName.rideArguments));
|
||||
Get.to(() => DriverSpeedLocationMapPage());
|
||||
// print(box.read(BoxName.rideArguments)['Duration']);
|
||||
},
|
||||
icon: const Icon(
|
||||
FontAwesome5.grin_tears,
|
||||
size: 29,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColor.secondaryColor,
|
||||
// border: Border.all(color: AppColor.blueColor),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome5.grin_tears,
|
||||
// size: 29,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
import 'package:SEFER/controller/home/captin/speed_map_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../controller/functions/location_controller.dart';
|
||||
|
||||
class SpeedGoogleDriverMap extends StatelessWidget {
|
||||
const SpeedGoogleDriverMap({
|
||||
super.key,
|
||||
required this.locationController,
|
||||
});
|
||||
|
||||
final LocationController locationController;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(SpeedMapController());
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GetBuilder<SpeedMapController>(
|
||||
builder: (controller) => GoogleMap(
|
||||
onMapCreated: controller.onMapCreated,
|
||||
initialCameraPosition: CameraPosition(
|
||||
// bearing: 45,
|
||||
target: locationController.myLocation,
|
||||
zoom: 16,
|
||||
tilt: 40,
|
||||
),
|
||||
onCameraMoveStarted: () {},
|
||||
onCameraMove: (position) {
|
||||
locationController.myLocation = position.target;
|
||||
controller.mapController!
|
||||
.animateCamera(CameraUpdate.newCameraPosition(position));
|
||||
},
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
myLocationEnabled: true,
|
||||
compassEnabled: true,
|
||||
mapType: MapType.normal,
|
||||
trafficEnabled: true,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
zoomControlsEnabled: true,
|
||||
fortyFiveDegreeImageryEnabled: true,
|
||||
zoomGesturesEnabled: true,
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route1'),
|
||||
points: controller.polylineCoordinates,
|
||||
color: AppColor.yellowColor,
|
||||
width: 4,
|
||||
),
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route'),
|
||||
points: controller.polylineCoordinatesDestination,
|
||||
color: AppColor.primaryColor,
|
||||
width: 4,
|
||||
),
|
||||
},
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: locationController.myLocation,
|
||||
draggable: true,
|
||||
icon: controller.carIcon,
|
||||
rotation: locationController.heading),
|
||||
Marker(
|
||||
markerId: MarkerId('start'.tr),
|
||||
position: controller.latLngPassengerLocation,
|
||||
draggable: true,
|
||||
icon: controller.startIcon,
|
||||
),
|
||||
Marker(
|
||||
markerId: MarkerId('end'.tr),
|
||||
position: controller.latLngPassengerDestination,
|
||||
draggable: true,
|
||||
icon: controller.endIcon,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:SEFER/controller/functions/tts.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:SEFER/views/home/Captin/driver_map_speed.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
|
||||
@@ -29,118 +29,123 @@ class CardSeferWalletDriver extends StatelessWidget {
|
||||
DateTime? lastRequestTime =
|
||||
box.read(BoxName.lastTimeCaptainWalletCashOut);
|
||||
|
||||
if (lastRequestTime == null ||
|
||||
now.difference(lastRequestTime).inHours >= 24) {
|
||||
// Update the last request time to now
|
||||
lastRequestTime = now;
|
||||
await box.write(
|
||||
BoxName.lastTimeCaptainWalletCashOut, lastRequestTime);
|
||||
box.write(BoxName.cvvCode, 1111);
|
||||
if (double.parse(
|
||||
Get.find<CaptainWalletController>().totalAmountVisa) >
|
||||
100) {
|
||||
Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
title: 'Do you want to collect your earnings?'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Total wallet is '.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Wallet Type'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
MyDropDown(),
|
||||
],
|
||||
),
|
||||
Form(
|
||||
key: captainWalletController.formKey,
|
||||
child: MyTextForm(
|
||||
controller: captainWalletController.issurWallet,
|
||||
label: "Enter your wallet number".tr,
|
||||
hint: "Enter your wallet number".tr,
|
||||
type: TextInputType.phone,
|
||||
// if (lastRequestTime == null ||
|
||||
// now.difference(lastRequestTime).inHours >= 24) {
|
||||
// // Update the last request time to now
|
||||
// lastRequestTime = now;
|
||||
// await box.write(
|
||||
// BoxName.lastTimeCaptainWalletCashOut, lastRequestTime);
|
||||
// box.write(BoxName.cvvCode, 1111);
|
||||
if (double.parse(
|
||||
Get.find<CaptainWalletController>().totalAmountVisa) >
|
||||
100) {
|
||||
Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
title: 'Do you want to collect your earnings?'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Total wallet is '.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () async {
|
||||
if (captainWalletController.formKey.currentState!
|
||||
.validate()) {
|
||||
if (double.parse(Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa) >
|
||||
100) {
|
||||
Get.back();
|
||||
String amountAfter5LE = (double.parse(
|
||||
Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa) -
|
||||
5)
|
||||
.toStringAsFixed(0);
|
||||
await Get.put(PaymobPayout())
|
||||
.payToWalletDriverAll(
|
||||
amountAfter5LE,
|
||||
captainWalletController.issurWallet.toString(),
|
||||
captainWalletController.issurWallet.toString(),
|
||||
);
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'${'The Amount is less than'.tr}${box.read(BoxName.countryCode) == 'Egypt' ? '100' : '20'}',
|
||||
'',
|
||||
backgroundColor: AppColor.yellowColor);
|
||||
}
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Wallet Type'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
MyDropDown1(),
|
||||
],
|
||||
),
|
||||
Form(
|
||||
key: captainWalletController.formKey,
|
||||
child: MyTextForm(
|
||||
controller: captainWalletController.phoneWallet,
|
||||
label: "Enter your wallet number".tr,
|
||||
hint: "Enter your wallet number".tr,
|
||||
type: TextInputType.phone,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () async {
|
||||
if (captainWalletController.formKey.currentState!
|
||||
.validate()) {
|
||||
if (double.parse(Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa) >
|
||||
100) {
|
||||
Get.back();
|
||||
String amountAfter5LE = (double.parse(
|
||||
Get.find<CaptainWalletController>()
|
||||
.totalAmountVisa) -
|
||||
5)
|
||||
.toStringAsFixed(0);
|
||||
print(Get.find<PaymobPayout>()
|
||||
.dropdownValue
|
||||
.toString());
|
||||
print(captainWalletController.phoneWallet.text
|
||||
.toString());
|
||||
await Get.put(PaymobPayout()).payToWalletDriverAll(
|
||||
amountAfter5LE,
|
||||
Get.find<PaymobPayout>().dropdownValue.toString(),
|
||||
captainWalletController.phoneWallet.text
|
||||
.toString(),
|
||||
);
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'${'The Amount is less than'.tr}${box.read(BoxName.countryCode) == 'Egypt' ? '100' : '20'}',
|
||||
'',
|
||||
backgroundColor: AppColor.yellowColor);
|
||||
}
|
||||
},
|
||||
kolor: AppColor.greenColor,
|
||||
),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'cancel'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
));
|
||||
} else {
|
||||
{
|
||||
Get.snackbar(
|
||||
'${'The Amount is less than'.tr}${box.read(BoxName.countryCode) == 'Egypt' ? '100' : '20'}',
|
||||
'',
|
||||
backgroundColor: AppColor.yellowColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
kolor: AppColor.greenColor,
|
||||
),
|
||||
cancel: MyElevatedButton(
|
||||
title: 'cancel'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
));
|
||||
} else {
|
||||
// Optionally show a message or handle the throttling case
|
||||
final hoursLeft = 24 - now.difference(lastRequestTime).inHours;
|
||||
Get.snackbar(
|
||||
'${'Please wait'.tr} $hoursLeft ${"hours before trying again.".tr}',
|
||||
'');
|
||||
{
|
||||
Get.snackbar(
|
||||
'${'The Amount is less than'.tr}${box.read(BoxName.countryCode) == 'Egypt' ? '100' : '20'}',
|
||||
'',
|
||||
backgroundColor: AppColor.yellowColor);
|
||||
}
|
||||
}
|
||||
// } else {
|
||||
// // Optionally show a message or handle the throttling case
|
||||
// final hoursLeft = 24 - now.difference(lastRequestTime).inHours;
|
||||
// Get.snackbar(
|
||||
// '${'Please wait'.tr} $hoursLeft ${"hours before trying again.".tr}',
|
||||
// '');
|
||||
// }
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width * .85,
|
||||
|
||||
128
lib/views/home/my_wallet/transfer_budget_page.dart
Normal file
128
lib/views/home/my_wallet/transfer_budget_page.dart
Normal file
@@ -0,0 +1,128 @@
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:SEFER/views/widgets/my_textField.dart';
|
||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/payment/captain_wallet_controller.dart';
|
||||
|
||||
class TransferBudgetPage extends StatelessWidget {
|
||||
const TransferBudgetPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(CaptainWalletController());
|
||||
return MyScafolld(
|
||||
title: "Transfer budget".tr,
|
||||
body: [
|
||||
GetBuilder<CaptainWalletController>(
|
||||
builder: (captainWalletController) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
height: Get.height * .7,
|
||||
width: double.infinity,
|
||||
child: Form(
|
||||
key: captainWalletController.formKeyTransfer,
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
MyTextForm(
|
||||
controller: captainWalletController
|
||||
.newDriverPhoneController,
|
||||
label: 'phone number of driver'.tr,
|
||||
hint: 'phone number of driver',
|
||||
type: TextInputType.phone),
|
||||
MyTextForm(
|
||||
controller: captainWalletController
|
||||
.amountFromBudgetController,
|
||||
label: 'insert amount'.tr,
|
||||
hint:
|
||||
'${'You have in account'.tr} ${captainWalletController.totalAmountVisa}',
|
||||
type: TextInputType.number),
|
||||
captainWalletController.isNewTransfer
|
||||
? const MyCircularProgressIndicator()
|
||||
: captainWalletController
|
||||
.amountToNewDriverMap.isEmpty
|
||||
? MyElevatedButton(
|
||||
title: 'Next'.tr,
|
||||
onPressed: () async {
|
||||
await captainWalletController
|
||||
.detectNewDriverFromMyBudget();
|
||||
})
|
||||
: const SizedBox(),
|
||||
captainWalletController.amountToNewDriverMap.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.maxFinite,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
'Name :'.tr +
|
||||
captainWalletController
|
||||
.amountToNewDriverMap[0]['name']
|
||||
.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
width: double.maxFinite,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
"${"NationalID".tr} ${captainWalletController.amountToNewDriverMap[0]['national_number']}",
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
width: double.maxFinite,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
"${"amount".tr} ${captainWalletController.amountFromBudgetController.text} ${'LE'.tr}",
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
captainWalletController
|
||||
.amountToNewDriverMap.isNotEmpty
|
||||
? MyElevatedButton(
|
||||
title: 'Transfer'.tr,
|
||||
onPressed: () async {
|
||||
await captainWalletController
|
||||
.addtransferDriversWallet(
|
||||
'Transfer');
|
||||
})
|
||||
: const SizedBox()
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox()
|
||||
],
|
||||
)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import '../../../controller/payment/driver_payment_controller.dart';
|
||||
import '../../widgets/my_scafold.dart';
|
||||
import 'card_wallet_widget.dart';
|
||||
import 'points_captain.dart';
|
||||
import 'transfer_budget_page.dart';
|
||||
import 'weekly_payment_page.dart';
|
||||
|
||||
class WalletCaptain extends StatelessWidget {
|
||||
@@ -254,6 +255,11 @@ class WalletCaptain extends StatelessWidget {
|
||||
}));
|
||||
},
|
||||
),
|
||||
MyElevatedButton(
|
||||
title: 'Transfer budget'.tr,
|
||||
onPressed: () {
|
||||
Get.to(() => const TransferBudgetPage());
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -370,6 +376,7 @@ class WalletCaptain extends StatelessWidget {
|
||||
: const SizedBox(
|
||||
height: 30,
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
@@ -425,37 +432,32 @@ class WalletCaptain extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class MyDropDown extends StatefulWidget {
|
||||
@override
|
||||
_MyDropDownState createState() => _MyDropDownState();
|
||||
}
|
||||
|
||||
class _MyDropDownState extends State<MyDropDown> {
|
||||
String dropdownValue = 'Itsalate';
|
||||
|
||||
class MyDropDown1 extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DropdownButton<String>(
|
||||
value: dropdownValue,
|
||||
icon: const Icon(Icons.arrow_drop_down),
|
||||
elevation: 16,
|
||||
style: const TextStyle(color: Colors.deepPurple),
|
||||
underline: Container(
|
||||
height: 2,
|
||||
color: Colors.deepPurpleAccent,
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
dropdownValue = newValue!;
|
||||
});
|
||||
},
|
||||
items: <String>['Itsalate', 'We', 'Orange', 'Vodafone']
|
||||
.map<DropdownMenuItem<String>>((String value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
Get.put(PaymobPayout());
|
||||
return GetBuilder<PaymobPayout>(builder: (controller) {
|
||||
return DropdownButton<String>(
|
||||
value: controller.dropdownValue,
|
||||
icon: const Icon(Icons.arrow_drop_down),
|
||||
elevation: 16,
|
||||
style: const TextStyle(color: Colors.deepPurple),
|
||||
underline: Container(
|
||||
height: 2,
|
||||
color: Colors.deepPurpleAccent,
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
controller.dropdownValue = newValue!;
|
||||
controller.update();
|
||||
},
|
||||
items: <String>['etisalat', 'aman', 'orange', 'vodafone']
|
||||
.map<DropdownMenuItem<String>>((String value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user