Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
route_info_card.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:flutter_screenutil/flutter_screenutil.dart';
3
4import '../../../../core/UI/theme/color_palette.dart';
5import '../../../models/driver_request.dart';
6
7class RouteInfoCard extends StatelessWidget {
9
11 super.key,
12 required this.request,
13 });
14
15 @override
16 Widget build(BuildContext context) {
17 return Container(
18 margin: EdgeInsets.only(bottom: 16.h),
19 decoration: BoxDecoration(
20 borderRadius: BorderRadius.circular(16.r),
22 ),
23 child: Padding(
24 padding: EdgeInsets.all(16.sp),
26 crossAxisAlignment: CrossAxisAlignment.start,
27 children: [
28 // Header with route icon
29 Row(
30 children: [
31 Container(
32 padding: EdgeInsets.all(10.sp),
33 decoration: BoxDecoration(
34 borderRadius: BorderRadius.circular(12.r),
35 ),
36 child: Icon(
37 Icons.route,
38 size: 18.sp,
40 ),
41 ),
42 SizedBox(width: 12.w),
43 Text(
44 'Route Information',
45 style: TextStyle(
46 fontSize: 16.sp,
47 fontWeight: FontWeight.w700,
49 height: 1.2,
50 ),
51 ),
52 ],
53 ),
54 SizedBox(height: 10.h),
55 // Start point
56 Container(
57 padding: EdgeInsets.all(5.sp),
58 child: Row(
59 children: [
60 Container(
61 padding: EdgeInsets.all(10.sp),
62 decoration: BoxDecoration(
63 borderRadius: BorderRadius.circular(12.r),
64 border: Border.all(
65 color: ColorPalette.lightGreen.withValues(alpha: 0.2),
66 width: 1,
67 ),
68 ),
69 child: Icon(
70 Icons.location_on_outlined,
71 size: 18.sp,
73 ),
74 ),
75 SizedBox(width: 8.w),
76 Expanded(
78 crossAxisAlignment: CrossAxisAlignment.start,
79 children: [
80 Text(
81 'From',
82 style: TextStyle(
83 fontSize: 10.sp,
85 fontWeight: FontWeight.w500,
86 ),
87 ),
88 Text(
89 request.startPoint,
90 style: TextStyle(
91 fontSize: 13.sp,
93 fontWeight: FontWeight.w600,
94 height: 1.3,
95 ),
96 ),
97 ],
98 ),
99 ),
100 ],
101 ),
102 ),
103 SizedBox(height: 6.h),
104 // End point
105 Container(
106 padding: EdgeInsets.all(8.sp),
107 child: Row(
108 children: [
109 Container(
110 padding: EdgeInsets.all(10.sp),
111 decoration: BoxDecoration(
112 borderRadius: BorderRadius.circular(12.r),
113 border: Border.all(
114 color: ColorPalette.lightGreen.withValues(alpha: 0.2),
115 width: 1,
116 ),
117 ),
118 child: Icon(
119 Icons.location_on,
120 size: 18.sp,
122 ),
123 ),
124 SizedBox(width: 8.w),
125 Expanded(
126 child: Column(
127 crossAxisAlignment: CrossAxisAlignment.start,
128 children: [
129 Text(
130 'To',
131 style: TextStyle(
132 fontSize: 10.sp,
134 fontWeight: FontWeight.w500,
135 ),
136 ),
137 Text(
138 request.endPoint,
139 style: TextStyle(
140 fontSize: 13.sp,
142 fontWeight: FontWeight.w600,
143 height: 1.3,
144 ),
145 ),
146 ],
147 ),
148 ),
149 ],
150 ),
151 ),
152 ],
153 ),
154 ),
155 );
156 }
157}
static const darkGrey
static const lightGreen
static const white
static const grey
const RouteInfoCard({ super.key, required this.request, })
final DriverRequest request
final Widget child
override Widget build(BuildContext context)
final EdgeInsets padding
abstract class CollectionsToScheduleEvent extends Equatable request
DriverRequest({ required this.id, required this.driverName, required this.creationDate, required this.stations, required this.startPoint, required this.endPoint, })
style Text( '${ 'scheduling.reference'.tr()}:${collection.internalCode}', style:Theme.of(context).textTheme.bodySmall,)
style SizedBox(height:2.h)
style Column(crossAxisAlignment:CrossAxisAlignment.end, children:[Container(padding:EdgeInsets.symmetric(horizontal:8.w, vertical:4.h), decoration:BoxDecoration(color:ColorPalette.tiffanyBlue.withValues(alpha:0.1), borderRadius:BorderRadius.circular(12),), child:Text(collection.type ?? '', style:Theme.of(context).textTheme.bodySmall?.copyWith(color:ColorPalette.tiffanyBlue, fontWeight:FontWeight.bold,),),),],)