fix(library): replace library badge text with a folder icon

This commit is contained in:
zarzet
2026-09-27 15:44:20 +07:00
parent 25f9d16e3d
commit 2304894276
+14 -25
View File
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:spotiflac_android/theme/app_tokens.dart';
import 'package:spotiflac_android/l10n/l10n.dart';
/// Small "In Library" chip shown next to a track that already exists in the
/// Compact folder badge shown next to a track that already exists in the
/// local library or download history.
class InLibraryBadge extends StatelessWidget {
const InLibraryBadge({super.key});
@@ -10,30 +10,19 @@ class InLibraryBadge extends StatelessWidget {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return Container(
padding: context.tokens.badgePadding,
decoration: BoxDecoration(
color: colorScheme.primaryContainer,
borderRadius: context.tokens.borderRadiusBadge,
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.folder_outlined,
size: 12,
color: colorScheme.onPrimaryContainer,
),
const SizedBox(width: 3),
Text(
context.l10n.libraryInLibrary,
style: TextStyle(
fontSize: context.tokens.badgeFontSize,
fontWeight: FontWeight.w500,
color: colorScheme.onPrimaryContainer,
),
),
],
return Tooltip(
message: context.l10n.libraryInLibrary,
child: Container(
padding: context.tokens.badgePadding,
decoration: BoxDecoration(
color: colorScheme.primaryContainer,
borderRadius: context.tokens.borderRadiusBadge,
),
child: Icon(
Icons.folder_outlined,
size: 14,
color: colorScheme.onPrimaryContainer,
),
),
);
}