@@ -13,6 +13,7 @@ class ZetaFilterSelection extends ZetaStatelessWidget {
13
13
required this .items,
14
14
this .onPressed,
15
15
this .buttonSemanticLabel,
16
+ this .icon = ZetaIcons .filter,
16
17
});
17
18
18
19
/// The filter items - list of [ZetaFilterChip] .
@@ -26,6 +27,11 @@ class ZetaFilterSelection extends ZetaStatelessWidget {
26
27
/// {@macro zeta-widget-semantic-label}
27
28
final String ? buttonSemanticLabel;
28
29
30
+ /// Icon for the filter button.
31
+ ///
32
+ /// Default is [ZetaIcons.filter] .
33
+ final IconData icon;
34
+
29
35
@override
30
36
Widget build (BuildContext context) {
31
37
return SizedBox (
@@ -43,10 +49,7 @@ class ZetaFilterSelection extends ZetaStatelessWidget {
43
49
child: IconButton (
44
50
visualDensity: VisualDensity .compact,
45
51
onPressed: onPressed,
46
- icon: const ZetaIcon (
47
- ZetaIcons .filter,
48
- size: ZetaSpacing .xl_2,
49
- ),
52
+ icon: ZetaIcon (icon, size: ZetaSpacing .xl_2),
50
53
),
51
54
),
52
55
),
@@ -70,6 +73,7 @@ class ZetaFilterSelection extends ZetaStatelessWidget {
70
73
properties
71
74
..add (DiagnosticsProperty <bool >('rounded' , rounded))
72
75
..add (ObjectFlagProperty <VoidCallback ?>.has ('onPressed' , onPressed))
73
- ..add (StringProperty ('buttonSemanticLabel' , buttonSemanticLabel));
76
+ ..add (StringProperty ('buttonSemanticLabel' , buttonSemanticLabel))
77
+ ..add (DiagnosticsProperty <IconData >('icon' , icon));
74
78
}
75
79
}
0 commit comments