Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
details_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 '../../../../../../core/common/enums/collection_priority.dart';
6import '../../../../../../core/common/enums/collection_status.dart';
7import '../../../../../../core/ui/widgets/collection_badges/collection_priority_badge.dart';
8import '../../../../../../core/ui/widgets/collection_badges/collection_status_badge.dart';
9
10class DetailsHeader extends StatelessWidget {
11 final String title;
15
17 super.key,
18 required this.title,
19 required this.status,
20 required this.timeSlot,
21 required this.priority,
22 });
23
24 @override
25 Widget build(BuildContext context) {
26 return Container(
27 padding: EdgeInsets.all(20.sp),
28 decoration: BoxDecoration(
30 borderRadius: BorderRadius.circular(20),
31 boxShadow: [
32 BoxShadow(
33 color: ColorPalette.black.withValues(alpha:0.05),
34 blurRadius: 10,
35 offset: const Offset(0, 2),
36 ),
37 ],
38 ),
40 crossAxisAlignment: CrossAxisAlignment.start,
41 children: [
42 Row(
43 mainAxisAlignment: MainAxisAlignment.spaceBetween,
44 children: [
46 width: MediaQuery.sizeOf(context).width * 0.5,
47 child: Text(
48 title,
49 style: Theme.of(context).textTheme.titleMedium?.copyWith(
51 fontWeight: FontWeight.w600,
52 ),
53 ),
54 ),
56 ],
57 ),
58 SizedBox(height: 12.h),
59 Row(
60 children: [
62 SizedBox(width: 12.w),
63 Icon(
64 Icons.access_time_rounded,
65 size: 16.sp,
67 ),
68 SizedBox(width: 4.w),
69 Text(
71 style: TextStyle(
72 fontSize: 14.sp,
74 fontWeight: FontWeight.w500,
75 ),
76 ),
77 ],
78 ),
79 ],
80 ),
81 );
82 }
83}
static const darkGrey
static const black
static const white
final String timeSlot
final String title
final Widget child
const CollectionStatusBadge({ super.key, required this.status, })
final CollectionPriority priority
override Widget build(BuildContext context)
const CollectionPriorityBadge({ super.key, required this.priority, })
final CollectionStatus status
const DetailsHeader({ super.key, required this.title, required this.status, required this.timeSlot, required this.priority, })
final EdgeInsets padding
CollectionStatus
class Partner String
final String title
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,),),),],)