Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
request_header.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 RequestHeader extends StatelessWidget {
9
11 super.key,
12 required this.request,
13 });
14
15 @override
16 Widget build(BuildContext context) {
17 return Container(
18 padding: EdgeInsets.all(16.sp),
19 decoration: BoxDecoration(
21 borderRadius: BorderRadius.circular(12.r),
22 boxShadow: [
23 BoxShadow(
24 color: Colors.grey.withValues(alpha: 0.1),
25 blurRadius: 8,
26 offset: const Offset(0, 2),
27 ),
28 ],
29 ),
31 crossAxisAlignment: CrossAxisAlignment.start,
32 children: [
33 Row(
34 mainAxisAlignment: MainAxisAlignment.spaceBetween,
35 children: [
36 Text(
37 request.id,
38 style: TextStyle(
39 fontSize: 18.sp,
40 fontWeight: FontWeight.bold,
42 ),
43 ),
44 Container(
45 padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 6.h),
46 decoration: BoxDecoration(
47 color: ColorPalette.lightGreen.withValues(alpha: 0.1),
48 borderRadius: BorderRadius.circular(12.r),
49 border: Border.all(
50 color: ColorPalette.lightGreen.withValues(alpha: 0.2),
51 width: 1,
52 ),
53 ),
54 child: Text(
55 '${request.numberOfStations} stations',
56 style: TextStyle(
57 fontSize: 12.sp,
58 fontWeight: FontWeight.w600,
60 ),
61 ),
62 ),
63 ],
64 ),
65 SizedBox(height: 8.h),
66 Text(
67 'Driver: ${request.driverName}',
68 style: TextStyle(
69 fontSize: 14.sp,
71 ),
72 ),
73 SizedBox(height: 4.h),
74 Text(
75 'Created: ${request.creationDate.hour.toString().padLeft(2, '0')}:${request.creationDate.minute.toString().padLeft(2, '0')}',
76 style: TextStyle(
77 fontSize: 12.sp,
79 ),
80 ),
81 ],
82 ),
83 );
84 }
85}
static const darkGrey
static const lightGreen
static const white
static const grey
final DriverRequest request
final Widget child
override Widget build(BuildContext context)
final EdgeInsets padding
const RequestHeader({ super.key, required this.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,),),),],)