feat(ui): add Mornye glass theme and adaptive music player

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.
This commit is contained in:
zarzet
2026-09-19 12:10:10 +07:00
parent 1ebdac8645
commit 63e1a9b9c8
155 changed files with 15707 additions and 2318 deletions
+8 -4
View File
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:spotiflac_android/l10n/l10n.dart';
import 'package:spotiflac_android/widgets/app_alert_dialog.dart';
/// Shows a delete-confirmation dialog, deletes the given [ids] one by one via
/// [deleteItem], then shows a "deleted N tracks" snackbar.
@@ -17,17 +18,20 @@ Future<int?> confirmAndDeleteTracks({
Future<void> Function(List<String> ids)? persistDeletedItems,
required VoidCallback onExitSelectionMode,
}) async {
final confirmed = await showDialog<bool>(
final confirmed = await showAppDialog<bool>(
context: context,
builder: (ctx) => AlertDialog(
builder: (ctx) => AppAlertDialog(
title: Text(context.l10n.downloadedAlbumDeleteSelected),
content: Text(context.l10n.downloadedAlbumDeleteMessage(ids.length)),
actions: [
TextButton(
AppDialogAction(
isDefault: true,
onPressed: () => Navigator.pop(ctx, false),
child: Text(context.l10n.dialogCancel),
),
FilledButton(
AppDialogAction(
filled: true,
isDestructive: true,
onPressed: () => Navigator.pop(ctx, true),
style: FilledButton.styleFrom(
backgroundColor: Theme.of(context).colorScheme.error,
+14
View File
@@ -10,3 +10,17 @@ import 'package:flutter/widgets.dart';
extension NavBarInset on BuildContext {
double get navBarBottomInset => MediaQuery.paddingOf(this).bottom;
}
/// Keeps animated navigation-bar insets local to the trailing spacer instead
/// of rebuilding the screen and its lists on every chrome animation frame.
class NavBarSliverSpacer extends StatelessWidget {
const NavBarSliverSpacer({super.key, this.bottomInset});
/// An explicit inset for surfaces that do not inherit the shell's padding.
final double? bottomInset;
@override
Widget build(BuildContext context) => SliverToBoxAdapter(
child: SizedBox(height: bottomInset ?? context.navBarBottomInset),
);
}
+26
View File
@@ -0,0 +1,26 @@
import 'dart:io';
/// A saved queue may outlive the scan directory that supplied its artwork.
/// Consult the Library only when the saved local image is missing.
Future<String?> resolveRestoredArtworkUri(
String? artwork, {
required Future<String?> Function() loadLibraryCoverPath,
}) async {
try {
if (artwork != null && artwork.isNotEmpty) {
final uri = Uri.parse(artwork);
if (uri.hasScheme && uri.scheme != 'file') return artwork;
final path = uri.scheme == 'file' ? uri.toFilePath() : artwork;
if (await File(path).exists()) return artwork;
}
final cover = await loadLibraryCoverPath();
if (cover == null || cover.isEmpty) return artwork;
final path = cover.startsWith('file://')
? Uri.parse(cover).toFilePath()
: cover;
if (await File(path).exists()) return Uri.file(path).toString();
} catch (_) {
// Missing artwork or an unavailable Library must not discard playback.
}
return artwork;
}