add new featurs like new stat page
This commit is contained in:
@@ -18,7 +18,7 @@ class HistoryCaptain extends StatelessWidget {
|
||||
body: GetBuilder<HistoryCaptainController>(
|
||||
builder: (controller) {
|
||||
if (controller.isloading) {
|
||||
return const Center(
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: FinanceDesignSystem.primaryDark),
|
||||
);
|
||||
@@ -49,7 +49,7 @@ class HistoryCaptain extends StatelessWidget {
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
gradient: FinanceDesignSystem.balanceGradient,
|
||||
),
|
||||
),
|
||||
@@ -59,7 +59,7 @@ class HistoryCaptain extends StatelessWidget {
|
||||
child: Icon(
|
||||
Icons.history_rounded,
|
||||
size: 200,
|
||||
color: Colors.white.withOpacity(0.05),
|
||||
color: Colors.white.withValues(alpha: 0.05),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
@@ -77,7 +77,7 @@ class HistoryCaptain extends StatelessWidget {
|
||||
Text(
|
||||
'Total Rides'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.7),
|
||||
color: Colors.white.withValues(alpha: 0.7),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
@@ -203,7 +203,7 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(FinanceDesignSystem.cardRadius),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
color: Colors.black.withValues(alpha: 0.04),
|
||||
blurRadius: 15,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
@@ -227,10 +227,10 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: FinanceDesignSystem.primaryDark
|
||||
.withOpacity(0.05),
|
||||
.withValues(alpha: 0.05),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: const Icon(
|
||||
child: Icon(
|
||||
Icons.receipt_long_rounded,
|
||||
color: FinanceDesignSystem.primaryDark,
|
||||
size: 20,
|
||||
@@ -242,7 +242,7 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'${'OrderId'.tr} #${trip['order_id']}',
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
color: FinanceDesignSystem.primaryDark,
|
||||
@@ -269,14 +269,14 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const Icon(Icons.circle,
|
||||
Icon(Icons.circle,
|
||||
size: 12, color: FinanceDesignSystem.accentBlue),
|
||||
Container(
|
||||
width: 2,
|
||||
height: 20,
|
||||
color: Colors.grey.shade200,
|
||||
),
|
||||
const Icon(Icons.location_on_rounded,
|
||||
Icon(Icons.location_on_rounded,
|
||||
size: 14, color: FinanceDesignSystem.dangerRed),
|
||||
],
|
||||
),
|
||||
@@ -315,7 +315,7 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'${trip['price']} ${'SYP'.tr}',
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 16,
|
||||
color: FinanceDesignSystem.primaryDark,
|
||||
@@ -381,10 +381,10 @@ class _TripHistoryCard extends StatelessWidget {
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: color.withOpacity(0.3), width: 1),
|
||||
border: Border.all(color: color.withValues(alpha: 0.3), width: 1),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: color.withOpacity(0.1),
|
||||
color: color.withValues(alpha: 0.1),
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
|
||||
@@ -106,10 +106,10 @@ class AppDrawer extends StatelessWidget {
|
||||
color: Colors.cyan,
|
||||
onTap: () => Get.to(() => HelpCaptain())),
|
||||
DrawerItem(
|
||||
title: 'Referral Center'.tr,
|
||||
icon: Icons.card_giftcard_rounded,
|
||||
title: 'Invite Driver'.tr,
|
||||
icon: Icons.person_add_rounded,
|
||||
color: Colors.indigo,
|
||||
onTap: () => Get.to(() => ReferralCenterPage())),
|
||||
onTap: () => Get.to(() => InviteScreen())),
|
||||
// DrawerItem(
|
||||
// title: 'Maintenance Center'.tr,
|
||||
// icon: Icons.build,
|
||||
@@ -227,7 +227,7 @@ class _DrawerItemTile extends StatelessWidget {
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: item.color.withOpacity(0.1),
|
||||
color: item.color.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(item.icon, color: item.color, size: 24),
|
||||
@@ -240,13 +240,13 @@ class _DrawerItemTile extends StatelessWidget {
|
||||
?.copyWith(fontWeight: FontWeight.w500),
|
||||
),
|
||||
onTap: () {
|
||||
Get.back(); // لإغلاق القائمة عند الضغط
|
||||
Navigator.pop(context); // لإغلاق القائمة عند الضغط بشكل آمن
|
||||
Future.delayed(const Duration(milliseconds: 250), () {
|
||||
item.onTap(); // الانتقال للصفحة بعد تأخير بسيط لإظهار الأنيميشن
|
||||
});
|
||||
},
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
splashColor: item.color.withOpacity(0.2),
|
||||
splashColor: item.color.withValues(alpha: 0.2),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -327,7 +327,7 @@ class UserHeader extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: Colors.white, width: 2),
|
||||
boxShadow: [
|
||||
BoxShadow(color: Colors.black.withOpacity(0.3), blurRadius: 5)
|
||||
BoxShadow(color: Colors.black.withValues(alpha: 0.3), blurRadius: 5)
|
||||
],
|
||||
),
|
||||
child: controller.isloading
|
||||
@@ -377,19 +377,22 @@ class UserHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
otherAccountsPictures: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
homeCaptainController.rating.toString(),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const Icon(Icons.star, color: Colors.amber, size: 20),
|
||||
],
|
||||
SizedBox(
|
||||
width: 60,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
homeCaptainController.rating.toString(),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14),
|
||||
),
|
||||
const SizedBox(width: 2),
|
||||
const Icon(Icons.star, color: Colors.amber, size: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
decoration: BoxDecoration(
|
||||
|
||||
@@ -299,37 +299,38 @@ class _MapView extends StatelessWidget {
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (ctrl) {
|
||||
if (ctrl.isLoading) return const MyCircularProgressIndicator();
|
||||
final s = Get.find<SettingController>();
|
||||
|
||||
return GetBuilder<LocationController>(
|
||||
builder: (loc) => IntaleqMap(
|
||||
apiKey: Env.mapSaasKey,
|
||||
onMapCreated: ctrl.onMapCreated,
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: (loc.myLocation.latitude == 0 ||
|
||||
loc.myLocation.latitude.isNaN)
|
||||
? ctrl.myLocation
|
||||
: loc.myLocation,
|
||||
zoom: 15,
|
||||
return GetBuilder<SettingController>(
|
||||
builder: (s) => GetBuilder<LocationController>(
|
||||
builder: (loc) => IntaleqMap(
|
||||
apiKey: Env.mapSaasKey,
|
||||
onMapCreated: ctrl.onMapCreated,
|
||||
minMaxZoomPreference: const MinMaxZoomPreference(6, 18),
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: (loc.myLocation.latitude == 0 ||
|
||||
loc.myLocation.latitude.isNaN)
|
||||
? ctrl.myLocation
|
||||
: loc.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
mapType:
|
||||
s.isMapDarkMode ? IntaleqMapType.normal : IntaleqMapType.light,
|
||||
polygons: ctrl.heatmapPolygons,
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: loc.myLocation,
|
||||
rotation: loc.heading,
|
||||
flat: true,
|
||||
anchor: const Offset(0.5, 0.5),
|
||||
icon: ctrl.carIcon,
|
||||
)
|
||||
},
|
||||
myLocationButtonEnabled: false,
|
||||
myLocationEnabled: false,
|
||||
compassEnabled: false,
|
||||
zoomControlsEnabled: false,
|
||||
),
|
||||
mapType:
|
||||
s.isMapDarkMode ? IntaleqMapType.normal : IntaleqMapType.light,
|
||||
polygons: ctrl.heatmapPolygons,
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: loc.myLocation,
|
||||
rotation: loc.heading,
|
||||
flat: true,
|
||||
anchor: const Offset(0.5, 0.5),
|
||||
icon: ctrl.carIcon,
|
||||
)
|
||||
},
|
||||
myLocationButtonEnabled: false,
|
||||
myLocationEnabled: false,
|
||||
compassEnabled: false,
|
||||
zoomControlsEnabled: false,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user