1import 'package:easy_localization/easy_localization.dart';
2import 'package:fluentui_system_icons/fluentui_system_icons.dart';
3import 'package:flutter/material.dart';
4import 'package:flutter_screenutil/flutter_screenutil.dart';
6import '../../../../../../core/ui/theme/color_palette.dart';
13 required this.reference,
14 required this.collectedVolume,
18 Widget
build(BuildContext context) {
20 width:
double.infinity,
22 decoration: BoxDecoration(
24 borderRadius: BorderRadius.circular(20),
29 offset:
const Offset(0, 4),
36 icon: FluentIcons.qr_code_20_filled,
37 title:
'confirmation.cv_reference'.tr(),
42 const Divider(height: 24),
44 icon: FluentIcons.drop_12_filled,
45 title:
'confirmation.collected_quantity'.tr(),
56 required IconData
icon,
59 required Color iconColor,
60 required BuildContext context,
66 decoration: BoxDecoration(
67 color: iconColor.withValues(alpha: 0.1),
68 borderRadius: BorderRadius.circular(8),
75 crossAxisAlignment: CrossAxisAlignment.start,
79 style: Theme.of(context).textTheme.titleSmall!.copyWith(
86 style: Theme.of(context).textTheme.titleSmall!.copyWith(
98 if (
volume == null)
return "--";
99 double volumeValue =
volume is
double ?
volume :
double.tryParse(
volume.toString()) ?? 0.0;
100 if (volumeValue > 999) {
101 return '${(volumeValue / 1000).toStringAsFixed(2)} MT';
103 return '$volumeValue KG';
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,),),),],)