This commit is contained in:
Hamza-Ayed
2024-12-24 17:55:20 +03:00
parent 0fc3ce010b
commit 7751866428
9 changed files with 280 additions and 171 deletions

View File

@@ -497,7 +497,7 @@ class UserAccountHeader extends StatelessWidget {
padding: EdgeInsets.zero,
onPressed: () {
imageController.choosImagePicture(
AppLink.uploadImage1, 'portrait');
AppLink.uploadImagePortrate, 'portrait');
},
child: Container(
padding: const EdgeInsets.all(6),

View File

@@ -477,51 +477,56 @@ class HomeCaptain extends StatelessWidget {
const SizedBox(
height: 5,
),
box.read(BoxName.rideStatus) == 'Applied' ||
box.read(BoxName.rideStatus) == 'Begin'
? Positioned(
bottom: Get.height * .2,
right: 6,
child: AnimatedContainer(
duration: const Duration(microseconds: 200),
width: homeCaptainController.widthMapTypeAndTraffic,
decoration: BoxDecoration(
border: Border.all(color: AppColor.blueColor),
color: AppColor.secondaryColor,
borderRadius: BorderRadius.circular(15)),
child: GestureDetector(
onLongPress: () {
box.write(BoxName.rideStatus, 'delete');
homeCaptainController.update();
},
child: IconButton(
onPressed: () {
box.read(BoxName.rideStatus) == 'Applied'
? {
Get.to(() => PassengerLocationMapPage(),
arguments: box
.read(BoxName.rideArguments)),
Get.put(MapDriverController())
.changeRideToBeginToPassenger()
}
: {
Get.to(() => PassengerLocationMapPage(),
arguments: box
.read(BoxName.rideArguments)),
Get.put(MapDriverController())
.startRideFromStartApp()
};
GetBuilder<HomeCaptainController>(
builder: (homeCaptainController) {
return box.read(BoxName.rideStatus) == 'Applied' ||
box.read(BoxName.rideStatus) == 'Begin'
? Positioned(
bottom: Get.height * .2,
right: 6,
child: AnimatedContainer(
duration: const Duration(microseconds: 200),
width: homeCaptainController.widthMapTypeAndTraffic,
decoration: BoxDecoration(
border: Border.all(color: AppColor.blueColor),
color: AppColor.secondaryColor,
borderRadius: BorderRadius.circular(15)),
child: GestureDetector(
onLongPress: () {
box.write(BoxName.rideStatus, 'delete');
homeCaptainController.update();
},
icon: const Icon(
Icons.rice_bowl,
size: 29,
color: AppColor.blueColor,
child: IconButton(
onPressed: () {
box.read(BoxName.rideStatus) == 'Applied'
? {
Get.to(
() => PassengerLocationMapPage(),
arguments: box
.read(BoxName.rideArguments)),
Get.put(MapDriverController())
.changeRideToBeginToPassenger()
}
: {
Get.to(
() => PassengerLocationMapPage(),
arguments: box
.read(BoxName.rideArguments)),
Get.put(MapDriverController())
.startRideFromStartApp()
};
},
icon: const Icon(
Icons.rice_bowl,
size: 29,
color: AppColor.blueColor,
),
),
),
),
),
)
: const SizedBox()
)
: const SizedBox();
})
],
),
),