♻️ Unified the track tile widget

This commit is contained in:
2025-12-20 00:40:36 +08:00
parent a86e8b1cab
commit aaba0382cf
11 changed files with 353 additions and 186 deletions

View File

@@ -355,29 +355,35 @@ class _DesktopMiniPlayer extends HookConsumerWidget {
),
const Gap(8),
// Title & Artist
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12.0,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
currentMetadata?.title ??
Uri.parse(media.uri).pathSegments.last,
style: Theme.of(context).textTheme.bodyMedium
?.copyWith(fontWeight: FontWeight.bold),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Text(
currentMetadata?.artist ?? 'Unknown Artist',
style: Theme.of(context).textTheme.bodySmall,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
Flexible(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12.0,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
currentMetadata?.title ??
Uri.parse(media.uri).pathSegments.last,
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(fontWeight: FontWeight.bold),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Text(
currentMetadata?.artist ?? 'Unknown Artist',
style: Theme.of(
context,
).textTheme.bodySmall,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
),
],