mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-29 21:02:09 +02:00
Add a selectable Mornye theme with shared glass controls, dialogs, sheets, notifications, and collection headers while retaining Material components. Update player artwork, lyrics transitions and highlighting, synchronized rolling time labels, volume controls, and compact navigation. Unify metadata, Library, search, and extension surfaces; preserve restored artwork and report extension load failures. Validation: full Flutter analyzer clean; 713 tests passed and 4 skipped; pinned Dart formatting and diff checks passed; signed ARM64 and ARM32 release APKs built and verified.
49 lines
1.5 KiB
Dart
49 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:spotiflac_android/l10n/l10n.dart';
|
|
import 'package:spotiflac_android/widgets/app_action_button.dart';
|
|
|
|
/// Full-width delete action for selection-mode bottom bars: destructive
|
|
/// (error) styling once at least one item is selected, disabled/neutral
|
|
/// otherwise.
|
|
class DestructiveSelectionButton extends StatelessWidget {
|
|
const DestructiveSelectionButton({
|
|
super.key,
|
|
required this.count,
|
|
required this.colorScheme,
|
|
required this.onPressed,
|
|
});
|
|
|
|
final int count;
|
|
final ColorScheme colorScheme;
|
|
final VoidCallback onPressed;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: double.infinity,
|
|
child: AppActionButton(
|
|
isDestructive: true,
|
|
onPressed: count > 0 ? onPressed : null,
|
|
icon: const Icon(Icons.delete_outline),
|
|
label: Text(
|
|
count > 0
|
|
? context.l10n.downloadedAlbumDeleteCount(count)
|
|
: context.l10n.downloadedAlbumSelectToDelete,
|
|
),
|
|
style: FilledButton.styleFrom(
|
|
backgroundColor: count > 0
|
|
? colorScheme.error
|
|
: colorScheme.surfaceContainerHighest,
|
|
foregroundColor: count > 0
|
|
? colorScheme.onError
|
|
: colorScheme.onSurfaceVariant,
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|