Initial commit

This commit is contained in:
Hamza-Ayed
2024-10-12 19:19:26 +03:00
parent 2e3ce78fe8
commit aca697578d
41 changed files with 2976 additions and 1188 deletions

View File

@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../constant/api_key.dart';
import '../../../constant/links.dart';
class CupertinoDriverListWidget extends StatelessWidget {
MapPassengerController mapPassengerController =
@@ -30,9 +31,39 @@ class CupertinoDriverListWidget extends StatelessWidget {
leading: CircleAvatar(
radius: 25,
backgroundImage: NetworkImage(
'${AK.serverPHP}/portrate_captain_image/${driver['id']}.jpg',
'${AppLink.seferCairoServer}/portrate_captain_image/${driver['id']}.jpg',
),
child: Builder(
builder: (context) {
return Image.network(
'${AppLink.seferCairoServer}/portrate_captain_image/${driver['id']}.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
);
},
);
},
),
backgroundColor: CupertinoColors.systemGrey5,
),
title: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -65,12 +96,12 @@ class CupertinoDriverListWidget extends StatelessWidget {
Text('${'Plate'.tr}: ${driver['car_plate']}'),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('${'Education'.tr}: ${driver['education']}'),
],
),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text('${'Education'.tr}: ${driver['education']}'),
// ],
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [