Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
scan_card.dart
Go to the documentation of this file.
1import 'package:fluentui_system_icons/fluentui_system_icons.dart';
2import 'package:flutter/material.dart';
3import 'package:flutter_screenutil/flutter_screenutil.dart';
4
5import '../../../../../../../core/ui/theme/color_palette.dart';
6import 'scan_section.dart';
7
8class ScanCard extends StatelessWidget {
10 final VoidCallback onDelete;
11
12 const ScanCard({
13 super.key,
14 required this.drum,
15 required this.onDelete,
16 });
17
18 @override
19 Widget build(BuildContext context) {
20 return Container(
21 margin: EdgeInsets.only(bottom: 8.sp),
22 padding: EdgeInsets.all(12.sp),
23 decoration: BoxDecoration(
25 borderRadius: BorderRadius.circular(12),
26 border: Border.all(color: ColorPalette.grey.withValues(alpha:0.2)),
27 boxShadow: [
28 BoxShadow(
29 color: Colors.black.withValues(alpha:0.03),
30 blurRadius: 4,
31 offset: const Offset(0, 2),
32 ),
33 ],
34 ),
35 child: Row(
36 children: [
37 Container(
38 padding: EdgeInsets.all(8.sp),
39 decoration: BoxDecoration(
40 color: ColorPalette.lightGreen.withValues(alpha:0.1),
41 borderRadius: BorderRadius.circular(8),
42 ),
43 child: Icon(
44 FluentIcons.box_16_regular,
46 size: 20.sp,
47 ),
48 ),
49 SizedBox(width: 12.sp),
50 Expanded(
52 crossAxisAlignment: CrossAxisAlignment.start,
53 children: [
54 Text(
55 drum.drumCode,
56 style: Theme.of(context).textTheme.titleSmall,
57 ),
58 ],
59 ),
60 ),
61 IconButton(
63 icon: Icon(
64 Icons.delete_outline,
66 size: 20.sp,
67 ),
68 ),
69 ],
70 ),
71 );
72 }
73}
static const lightGreen
static const white
static const grey
final VoidCallback onPressed
final Widget child
const ScanCard({ super.key, required this.drum, required this.onDelete, })
override Widget build(BuildContext context)
final VoidCallback onDelete
final EdgeInsets padding
final DrumScan drum
Definition scan_card.dart:9
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,),),),],)