v2.48.2 — Queue-UI (Warteschlange-Sheet)

## PlayerService
- warteschlange Getter (unveränderliche Kopie) + aktuellerIndex
- spieleAlsNaechstes(Song): fügt nach aktuellem Song ein
- amEndeHinzufuegen(Song): hängt ans Ende an
- verschiebeInWarteschlange(von, nach): Drag-and-Drop mit korrekter Anpassung des aktuellen Index

## WarteschlangeSheet (neu: lib/widgets/warteschlange_sheet.dart)
- Bottom-Sheet: aktuelle Warteschlange, aktueller Song rot markiert (▶)
- Tipp auf Song → sofort abspielen
- ReorderableListView (Bordmittel) zum Umsortieren per Drag
- Leer-Zustand + Titel-Zähler

## MiniPlayer
- Tipp auf den Miniplayer öffnet die Warteschlange (Bottom-Sheet)

Keine neuen Packages, flutter analyze 0 Issues, Tests 4/4
This commit is contained in:
Dustin
2026-08-04 16:25:04 +02:00
parent 42767a5646
commit 5edfae01e5
3 changed files with 215 additions and 11 deletions
+25 -11
View File
@@ -5,6 +5,7 @@ import 'package:just_audio/just_audio.dart';
import '../services/player_service.dart';
import '../models/song.dart';
import '../utils/farb_theme.dart';
import 'warteschlange_sheet.dart';
class MiniPlayer extends StatefulWidget {
const MiniPlayer({super.key});
@@ -51,6 +52,16 @@ class _MiniPlayerState extends State<MiniPlayer> {
if (mounted) setState(() {});
}
/// Öffnet die Warteschlange als Bottom-Sheet
void _zeigeWarteschlange() {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: MeloTheme.dunkel1,
builder: (_) => const WarteschlangeSheet(),
);
}
@override
void dispose() {
_player.removeListener(_onPlayerChanged);
@@ -69,16 +80,18 @@ class _MiniPlayerState extends State<MiniPlayer> {
? _position.inSeconds / _dauer.inSeconds : 0.0;
final hatCover = song.coverPfad != null && File(song.coverPfad!).existsSync();
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(
color: const Color(0xFF1A0A0A),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xFF2A1515)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
return GestureDetector(
onTap: _zeigeWarteschlange,
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(
color: const Color(0xFF1A0A0A),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xFF2A1515)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(12, 10, 12, 6),
child: Row(
@@ -129,7 +142,8 @@ class _MiniPlayerState extends State<MiniPlayer> {
),
),
),
],
],
),
),
);
}