Change selected colors in AppListItem

This commit is contained in:
Elias Bonnici 2024-03-22 13:39:14 +01:00
parent bb973bb508
commit daaffb6bd5
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
2 changed files with 9 additions and 1 deletions

View File

@ -70,6 +70,7 @@ class _AppListItemState<T> extends ConsumerState<AppListItem> {
final doubleTapIntent = widget.doubleTapIntent; final doubleTapIntent = widget.doubleTapIntent;
final trailing = widget.trailing; final trailing = widget.trailing;
final hasFeature = ref.watch(featureProvider); final hasFeature = ref.watch(featureProvider);
final colorScheme = Theme.of(context).colorScheme;
return Semantics( return Semantics(
label: widget.semanticTitle ?? widget.title, label: widget.semanticTitle ?? widget.title,
@ -124,6 +125,10 @@ class _AppListItemState<T> extends ConsumerState<AppListItem> {
ListTile( ListTile(
mouseCursor: mouseCursor:
widget.tapIntent != null ? SystemMouseCursors.click : null, widget.tapIntent != null ? SystemMouseCursors.click : null,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(48)),
selectedTileColor: colorScheme.secondaryContainer,
selectedColor: colorScheme.onSecondaryContainer,
selected: widget.selected, selected: widget.selected,
leading: widget.leading, leading: widget.leading,
title: Text( title: Text(

View File

@ -249,7 +249,10 @@ class _CertificateListItem extends ConsumerWidget {
leading: CircleAvatar( leading: CircleAvatar(
foregroundColor: colorScheme.onSecondary, foregroundColor: colorScheme.onSecondary,
backgroundColor: colorScheme.secondary, backgroundColor: colorScheme.secondary,
child: Icon(slot.isRetired ? Symbols.manage_history : Symbols.badge), child: Icon(
slot.isRetired ? Symbols.manage_history : Symbols.badge,
fill: selected ? 1 : 0,
),
), ),
title: slot.getDisplayName(l10n), title: slot.getDisplayName(l10n),
subtitle: certInfo != null subtitle: certInfo != null