Update: 2026-07-02 05:27:04
This commit is contained in:
@@ -17,6 +17,7 @@ import '../home/Captin/driver_map_page.dart';
|
||||
import '../widgets/my_scafold.dart';
|
||||
import '../widgets/mycircular.dart';
|
||||
import '../widgets/mydialoug.dart';
|
||||
import '../widgets/driver_earnings_badge.dart'; // ── إضافة ويدجت الأرباح ──
|
||||
|
||||
class AvailableRidesPage extends StatelessWidget {
|
||||
const AvailableRidesPage({super.key});
|
||||
@@ -126,7 +127,13 @@ class RideAvailableCard extends StatelessWidget {
|
||||
_buildRouteInfo(),
|
||||
const Divider(height: 24, thickness: 0.5),
|
||||
_buildRideDetails(),
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 12),
|
||||
// ── إضافة شارة الأرباح هنا ──
|
||||
const DriverEarningsBadge(
|
||||
earningsLabel: "أرباحك أعلى هنا مقارنة بـ المنافسين",
|
||||
extraAmount: 2.50, // القيمة هنا ستُسحب من الـ Socket / API قريباً
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildAcceptButton(),
|
||||
],
|
||||
),
|
||||
@@ -237,14 +244,23 @@ class RideAvailableCard extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildRideDetails() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_infoItem(Icons.social_distance, '${rideInfo['distance']} KM'),
|
||||
_infoItem(Icons.access_time, '${rideInfo['duration']} Min'),
|
||||
_infoItem(Icons.star, '${rideInfo['passengerRate'] ?? 5.0}',
|
||||
iconColor: Colors.amber),
|
||||
],
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
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)),
|
||||
),
|
||||
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),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user