Initial commit
This commit is contained in:
@@ -33,6 +33,7 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (box.read(BoxName.carType) == 'Speed' ||
|
||||
box.read(BoxName.carType) == 'Awfar Car' ||
|
||||
box.read(BoxName.carType) == 'Delivery') {
|
||||
Get.snackbar(
|
||||
'This price is'.tr +
|
||||
@@ -117,16 +118,24 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
: box.read(BoxName.carType) == 'Speed'
|
||||
? 'assets/images/carspeed.png'
|
||||
: box.read(BoxName.carType) ==
|
||||
'Delivery'
|
||||
'Scooter'
|
||||
? 'assets/images/moto.png'
|
||||
: box.read(BoxName.carType) ==
|
||||
'Mashwari'
|
||||
'Mishwar Vip'
|
||||
? 'assets/images/freeRide.png'
|
||||
: box.read(BoxName
|
||||
.carType) ==
|
||||
'Rayeh Gai'
|
||||
? 'assets/images/roundtrip.png'
|
||||
: 'assets/images/carspeed.png', // Default image if none of the above
|
||||
'Awfar Car'
|
||||
? 'assets/images/balash.png'
|
||||
: box.read(BoxName
|
||||
.carType) ==
|
||||
'Pink Bike'
|
||||
? 'assets/images/pinkBike.png'
|
||||
: box.read(BoxName
|
||||
.carType) ==
|
||||
'Rayeh Gai'
|
||||
? 'assets/images/roundtrip.png'
|
||||
: 'assets/images/carspeed.png', // Default image if none of the above
|
||||
width: 80,
|
||||
),
|
||||
Column(
|
||||
@@ -159,11 +168,51 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 30,
|
||||
radius: 25,
|
||||
backgroundImage: NetworkImage(
|
||||
// '',
|
||||
// ),
|
||||
'${AppLink.server}/portrate_captain_image/${controller.driverId}.jpg'),
|
||||
'${AppLink.server}/portrate_captain_image/${controller.driverId}.jpg',
|
||||
),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
return Image.network(
|
||||
'${AppLink.server}/portrate_captain_image/${controller.driverId}.jpg',
|
||||
fit: BoxFit.cover,
|
||||
loadingBuilder: (BuildContext context,
|
||||
Widget child,
|
||||
ImageChunkEvent? loadingProgress) {
|
||||
if (loadingProgress == null) {
|
||||
return child; // Image is loaded
|
||||
} else {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
value: loadingProgress
|
||||
.expectedTotalBytes !=
|
||||
null
|
||||
? loadingProgress
|
||||
.cumulativeBytesLoaded /
|
||||
(loadingProgress
|
||||
.expectedTotalBytes ??
|
||||
1)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
errorBuilder: (BuildContext context,
|
||||
Object error,
|
||||
StackTrace? stackTrace) {
|
||||
return const Icon(
|
||||
Icons
|
||||
.person, // Icon to show when image fails to load
|
||||
size:
|
||||
25, // Adjust the size as needed
|
||||
color: AppColor
|
||||
.blueColor, // Color for the error icon
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
@@ -196,7 +245,8 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
'message From passenger',
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
controller.driverToken,
|
||||
controller.driverToken
|
||||
.toString(),
|
||||
'ding.wav',
|
||||
);
|
||||
Get.back();
|
||||
|
||||
Reference in New Issue
Block a user