Kein Redesign — Schwarz/Rot, 4 Tabs und Lieder/Kategorie bleiben. Grundlage sind die Design-Skills: ui-ux-pro-max (Barrierefreiheit, Touch, Typografie, Bewegung), ui-design/mobile-android (Material 3) und die Token-Disziplin aus Hue. Behobene Maengel (messbar, nicht Geschmack): - Text in Colors.white38 an 17 Stellen = 3,4:1 Kontrast, WCAG verlangt 4,5:1. Ersetzt durch drei benannte Stufen (text1 15,9:1 / text2 8,8:1 / text3 4,9:1). theme_kontrast_test.dart rechnet die Verhaeltnisse bei jedem Lauf nach, statt sie zu behaupten. - SubTabs waren ~38 dp hoch (Material 3 verlangt 48), ohne Ripple und ohne Uebergang. Jetzt 48 dp, InkWell, AnimatedContainer, und die Auswahl wird Vorlesehilfen als Zustand gemeldet (Semantics.selected). - mini_player.dart: Expanded UM eine feste Hoehe herum — zwei widerspruechliche Angaben. Entschaerft. - Emoji in Bedienelementen der Einstellungen (jeweils neben einem echten Icon) entfernt. Neu in shared/theme.dart: MeloSpace (8er-Raster), MeloRadius, MeloMotion, Farbrollen text1/2/3 + border + hairline, minTouchTarget, vollstaendiges textTheme (7 Stufen) und Themes fuer Listen, Sheets, Snackbars, Fortschritt, Trenner. 318 Tests gruen (23 neue, 1 uebersprungen), flutter analyze ohne Befund. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FpPu4nuKjKKeX1RpdDeX81
68 lines
1.9 KiB
Dart
68 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../shared/sort_store.dart';
|
|
import '../shared/sortable_song_list.dart';
|
|
import 'database.dart';
|
|
import '../shared/theme.dart';
|
|
|
|
/// Favoriten-Tab: Shuffle-Wiedergabe und dieselbe Sortierung wie "Meine Musik",
|
|
/// nur auf den favorisierten Songs.
|
|
class FavoritesScreen extends StatelessWidget {
|
|
const FavoritesScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final db = context.read<MeloDb>();
|
|
return SafeArea(
|
|
bottom: false,
|
|
child: Column(
|
|
children: [
|
|
const Padding(
|
|
padding: EdgeInsets.fromLTRB(20, 16, 20, 4),
|
|
child: Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Text('Favoriten',
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w700)),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: StreamBuilder<List<Song>>(
|
|
stream: db.watchFavorites(),
|
|
builder: (context, snapshot) {
|
|
final songs = snapshot.data ?? const <Song>[];
|
|
return SortableSongList(
|
|
songs: songs,
|
|
storeKey: SortStore.favoriten,
|
|
empty: const _Empty(),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _Empty extends StatelessWidget {
|
|
const _Empty();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return const Center(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(Icons.favorite_border, size: 64, color: Colors.white24),
|
|
SizedBox(height: 12),
|
|
Text('Noch keine Favoriten', style: TextStyle(color: MeloTheme.text2)),
|
|
SizedBox(height: 6),
|
|
Text('Tippe in einer Liederliste auf das Herz.',
|
|
style: TextStyle(color: Colors.white30, fontSize: 12)),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|