Update codebase
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import 'package:tripz_driver/constant/currency.dart';
|
||||
import 'package:siro_driver/constant/currency.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intaleq_maps/intaleq_maps.dart'; // لتحديد الأنواع إذا لزم
|
||||
|
||||
import '../widgets/scheduled_ride_badge.dart';
|
||||
import '../widgets/sms_ride_badge.dart';
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/colors.dart';
|
||||
import '../../constant/links.dart';
|
||||
@@ -144,8 +146,7 @@ class RideAvailableCard extends StatelessWidget {
|
||||
? "أرباحك أعلى هنا مقارنة بـ المنافسين"
|
||||
: null,
|
||||
extraAmount: _earningsExtra,
|
||||
currency:
|
||||
rideInfo['driver_earnings_currency']?.toString() ?? 'ل.س',
|
||||
currency: rideInfo['driver_earnings_currency']?.toString() ?? 'ل.س',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildAcceptButton(),
|
||||
@@ -189,6 +190,18 @@ class RideAvailableCard extends StatelessWidget {
|
||||
.copyWith(color: AppColor.greenColor, fontSize: 13),
|
||||
),
|
||||
),
|
||||
// شارة الرحلة المجدولة — معلومة دائمة عن الرحلة، تظهر هنا
|
||||
// وفي نافذة الطلب والأوفرلي معاً.
|
||||
if (ScheduledRideBadge.isScheduled(rideInfo)) ...[
|
||||
const SizedBox(height: 8),
|
||||
ScheduledRideBadge(rideInfo: rideInfo, compact: true),
|
||||
],
|
||||
// راكب طلب برسالة نصية — لا يملك إنترنت، والاتصال هو
|
||||
// الوسيلة الوحيدة للتواصل معه.
|
||||
if (SmsRideBadge.isSmsRide(rideInfo)) ...[
|
||||
const SizedBox(height: 8),
|
||||
SmsRideBadge(rideInfo: rideInfo, compact: true),
|
||||
],
|
||||
if (rideInfo['has_steps']?.toString() == 'true') ...[
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
@@ -200,8 +213,7 @@ class RideAvailableCard extends StatelessWidget {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.alt_route,
|
||||
color: Colors.orange.shade800, size: 14),
|
||||
Icon(Icons.alt_route, color: Colors.orange.shade800, size: 14),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'متعددة التوقفات',
|
||||
@@ -262,26 +274,18 @@ class RideAvailableCard extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Theme.of(Get.context!).colorScheme.surfaceVariant.withOpacity(0.3),
|
||||
color: Theme.of(Get.context!).colorScheme.surfaceVariant.withOpacity(0.3),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(
|
||||
color: Theme.of(Get.context!).dividerColor.withOpacity(0.5)),
|
||||
border: Border.all(color: Theme.of(Get.context!).dividerColor.withOpacity(0.5)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_infoItem(Icons.social_distance_rounded, '${rideInfo['distance']} KM',
|
||||
iconColor: AppColor.primaryColor),
|
||||
Container(
|
||||
height: 20, width: 1, color: Theme.of(Get.context!).dividerColor),
|
||||
_infoItem(
|
||||
Icons.access_time_filled_rounded, '${rideInfo['duration']} Min',
|
||||
iconColor: Colors.blueAccent),
|
||||
Container(
|
||||
height: 20, width: 1, color: Theme.of(Get.context!).dividerColor),
|
||||
_infoItem(Icons.star_rounded, '${rideInfo['passengerRate'] ?? 5.0}',
|
||||
iconColor: Colors.amber),
|
||||
_infoItem(Icons.social_distance_rounded, '${rideInfo['distance']} KM', iconColor: AppColor.primaryColor),
|
||||
Container(height: 20, width: 1, color: Theme.of(Get.context!).dividerColor),
|
||||
_infoItem(Icons.access_time_filled_rounded, '${rideInfo['duration']} Min', iconColor: Colors.blueAccent),
|
||||
Container(height: 20, width: 1, color: Theme.of(Get.context!).dividerColor),
|
||||
_infoItem(Icons.star_rounded, '${rideInfo['passengerRate'] ?? 5.0}', iconColor: Colors.amber),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user