Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
vehicle_documents_screen.dart
Go to the documentation of this file.
1import 'package:fluentui_system_icons/fluentui_system_icons.dart';
2import 'package:flutter/material.dart';
3
4import '../../core/ui/theme/color_palette.dart';
5import '../../core/ui/widgets/custom_scaffold.dart';
6
7class VehicleDocumentsScreen extends StatefulWidget {
8 const VehicleDocumentsScreen({super.key});
9
10 @override
11 State<VehicleDocumentsScreen> createState() => _VehicleDocumentsScreenState();
12}
13
14class _VehicleDocumentsScreenState extends State<VehicleDocumentsScreen>
15 with SingleTickerProviderStateMixin {
16 final List<DocumentItem> documents = [
17 DocumentItem('Insurance', FluentIcons.shield_12_regular,
18 Colors.green.shade400, 'Valid until Dec 2025'),
20 'Vehicle registration',
21 FluentIcons.checkbox_unchecked_12_regular,
22 Colors.teal.shade400,
23 'Valid until Nov 2025'),
25 'Vehicle sanitization record',
26 FluentIcons.vehicle_car_16_regular,
27 Colors.blue.shade400,
28 'Expires Jan 2025'),
30 'Minicipal permit\n(if applicable)',
31 FluentIcons.text_description_16_regular,
32 Colors.indigo.shade400,
33 'Contract #A-12345'),
34 ];
35
36 @override
37 Widget build(BuildContext context) {
38 return CustomScaffold(
39 title: "",
40 backgroundColor: ColorPalette.antiFlashWhite,
41 body: SingleChildScrollView(
43 children: [_buildHeader(), _buildDocumentsView()],
44 ),
45 ),
46 );
47 }
48
49 Widget _buildHeader() {
50 return Padding(
51 padding: const EdgeInsets.all(20),
53 crossAxisAlignment: CrossAxisAlignment.start,
54 children: [
55 Row(
56 children: [
57 Column(
58 crossAxisAlignment: CrossAxisAlignment.start,
59 children: [
60 const Text(
61 'Vehicle Documents',
62 style: TextStyle(
63 fontSize: 28,
64 fontWeight: FontWeight.bold,
65 color: Colors.black,
66 ),
67 ),
68 const SizedBox(height: 8),
69 Container(
70 padding:
71 const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
72 decoration: BoxDecoration(
73 color: Colors.white,
74 borderRadius: BorderRadius.circular(20),
75 ),
76 child: const Row(
77 children: [
78 Icon(Icons.check_circle,
79 color: Colors.greenAccent, size: 16),
80 SizedBox(width: 4),
81 Text(
82 'All documents up to date',
83 style: TextStyle(color: Colors.black, fontSize: 12),
84 ),
85 ],
86 ),
87 ),
88 ],
89 ),
90 ],
91 ),
92 // Vehicle type
93 const SizedBox(height: 20),
94 Container(
95 padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
96 decoration: BoxDecoration(
97 color: Colors.white,
98 borderRadius: BorderRadius.circular(20),
99 ),
100 child: Row(
101 mainAxisSize: MainAxisSize.min,
102 children: [
103 Icon(FluentIcons.vehicle_car_16_regular,
104 color: Colors.blue.shade400, size: 16),
105 const SizedBox(width: 4),
106 const Text(
107 'Car: Toyota van',
108 style: TextStyle(color: Colors.black, fontSize: 12),
109 ),
110 ],
111 ),
112 ),
113 ],
114 ),
115 );
116 }
117
119 return Column(children: [
120 for (int index = 0; index < documents.length; index++)
122 ]);
123 }
124
126 return Container(
127 margin: const EdgeInsets.only(
128 bottom: 16,
129 left: 20,
130 right: 20,
131 ),
132 decoration: BoxDecoration(
133 color: Colors.white,
134 borderRadius: BorderRadius.circular(20),
135 boxShadow: [
136 BoxShadow(
137 color: Colors.black.withValues(alpha: 0.1),
138 blurRadius: 20,
139 offset: const Offset(0, 10),
140 ),
141 ],
142 ),
143 child: ClipRRect(
144 borderRadius: BorderRadius.circular(20),
145 child: Material(
146 color: Colors.transparent,
147 child: InkWell(
148 onTap: () {},
149 child: Padding(
150 padding: const EdgeInsets.all(20),
151 child: Row(
152 children: [
153 Container(
154 padding: const EdgeInsets.all(12),
155 decoration: BoxDecoration(
156 color: document.color.withValues(alpha: 0.1),
157 borderRadius: BorderRadius.circular(16),
158 ),
159 child: Icon(document.icon, color: document.color, size: 28),
160 ),
161 const SizedBox(width: 16),
162 Expanded(
163 child: Column(
164 crossAxisAlignment: CrossAxisAlignment.start,
165 children: [
166 Text(
167 document.title,
168 style: const TextStyle(
169 fontSize: 18,
170 fontWeight: FontWeight.bold,
171 ),
172 ),
173 const SizedBox(height: 4),
174 Text(
175 document.subtitle,
176 style: TextStyle(
177 color: Colors.grey.shade600,
178 fontSize: 14,
179 ),
180 ),
181 ],
182 ),
183 ),
184 Container(
185 padding: const EdgeInsets.all(8),
186 decoration: BoxDecoration(
187 color: document.color.withValues(alpha: 0.1),
188 borderRadius: BorderRadius.circular(12),
189 ),
190 child: Icon(
191 Icons.download_rounded,
192 color: document.color,
193 ),
194 ),
195 ],
196 ),
197 ),
198 ),
199 ),
200 ),
201 );
202 }
203}
204
205class DocumentItem {
206 final String title;
207 final IconData icon;
208 final Color color;
209 final String subtitle;
210
211 DocumentItem(this.title, this.icon, this.color, this.subtitle);
212}
class App extends StatefulWidget build(BuildContext context)
Definition app.dart:31
static const antiFlashWhite
DocumentItem(this.title, this.icon, this.color, this.subtitle)
final IconData icon
final String subtitle
const VehicleDocumentsScreen({super.key})
override State< VehicleDocumentsScreen > createState()
final Widget child
final EdgeInsets padding
class Partner String
Widget _buildDocumentCard(DocumentItem document)
Widget _buildHeader()
Widget _buildDocumentsView()
class DocumentsScreen extends StatefulWidget documents
final Color color
Definition failures.dart:1
final VoidCallback onTap
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,),),),],)