mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-29 12:52:13 +02:00
79 lines
2.4 KiB
Dart
79 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:spotiflac_android/l10n/l10n.dart';
|
|
import 'package:spotiflac_android/theme/mornye_theme.dart';
|
|
|
|
/// "Disc N" chip with a trailing hairline, shown between disc groups in
|
|
/// album track lists.
|
|
class DiscSeparatorChip extends StatelessWidget {
|
|
const DiscSeparatorChip({super.key, required this.discNumber});
|
|
|
|
final int discNumber;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
if (context.isMornye) {
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(20, 20, 20, 8),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Divider(
|
|
height: 1,
|
|
color: MornyeTheme.metadataDividerColor(context),
|
|
),
|
|
const SizedBox(height: 12),
|
|
Text(
|
|
context.l10n.downloadedAlbumDiscHeader(discNumber),
|
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
|
color: colorScheme.onSurfaceVariant,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(20, 16, 20, 8),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.secondaryContainer,
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
Icons.album,
|
|
size: 16,
|
|
color: colorScheme.onSecondaryContainer,
|
|
),
|
|
const SizedBox(width: 6),
|
|
Text(
|
|
context.l10n.downloadedAlbumDiscHeader(discNumber),
|
|
style: Theme.of(context).textTheme.labelLarge?.copyWith(
|
|
color: colorScheme.onSecondaryContainer,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(width: 12),
|
|
Expanded(
|
|
child: Container(
|
|
height: 1,
|
|
color: colorScheme.outlineVariant.withValues(alpha: 0.5),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|