Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
collection_list.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import '../../../../../core/common/entities/collection_entity.dart';
3import '../../../../../core/ui/widgets/collection_item/collection_item.dart';
4
5class CollectionList extends StatelessWidget {
6 final List<CollectionEntity> collections;
7 final Map<int, bool> selectedItems;
8 final Function(int, bool?) onItemSelected;
9
11 super.key,
12 required this.collections,
13 required this.selectedItems,
14 required this.onItemSelected,
15 });
16
17 @override
18 Widget build(BuildContext context) {
19 return Column(
20 children: collections
21 .map(
24 number: collection.id.toString(),
25 showNumber: false,
26 isCompleted: true,
27 // checkboxWidget: SizedBox(
28 // width: 24,
29 // height: 24,
30 // child: Checkbox(
31 // value: selectedItems[collection.id],
32 // onChanged: (value) => onItemSelected(collection.id!, value),
33 // shape: RoundedRectangleBorder(
34 // borderRadius: BorderRadius.circular(4),
35 // ),
36 // side: BorderSide(width: 1.5, color: Colors.grey[400]!),
37 // ),
38 // ),
39 ),
40 )
41 .toList(),
42 );
43 }
44}
const CollectionList({ super.key, required this.collections, required this.selectedItems, required this.onItemSelected, })
final List< CollectionEntity > collections
const CollectionItem({ super.key, required this.collection, required this.number, required this.showNumber, this.isCompleted=false, this.isPending=false, this.hidePriority=false, this.hideStatus=false, this.isHistory=false, })
override Widget build(BuildContext context)
final CollectionEntity collection
final Map< int, bool > selectedItems
final Function(int, bool?) onItemSelected
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,),),),],)