Neue Melo-UI Phase 1: 4 Tabs (Meine Musik/Suche/Favoriten/Download) + Sortierung
- Meine Musik als Startbildschirm ohne Topbar: Kopfzeile (Einstellungen, Suche, Musikerkennung), Schnellzugriffe, Shuffle + Sortieren, Liederliste - Sortierung nach Zuletzt hinzugefuegt / Name (A-Z-#) / Wie oft abgespielt, auf- und absteigend, pro Liste gespeichert (SortStore) - Favoriten als eigener Tab mit gleicher Shuffle-/Sortier-Leiste - Download-Tab uebernimmt den Navidrome-Server-Browser - DB-Schema 3: playCount, gezaehlt beim Titelstart - Theme auf #0B0B10 / #c0392b - Scan-Aktionen aus der entfallenen Topbar jetzt in den Einstellungen Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011snPXPafPC5i87o68H14W7
This commit is contained in:
+21
-20
@@ -2,18 +2,17 @@ import 'package:audio_service/audio_service.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'downloads/downloads_screen.dart';
|
||||
import 'library/database.dart';
|
||||
import 'library/library_screen.dart';
|
||||
import 'library/favorites_screen.dart';
|
||||
import 'library/library_service.dart';
|
||||
import 'library/my_music_screen.dart';
|
||||
import 'library/playlist_service.dart';
|
||||
import 'library/search_screen.dart';
|
||||
import 'player/audio_handler.dart';
|
||||
import 'player/mini_player.dart';
|
||||
import 'player/now_playing_screen.dart';
|
||||
import 'playlists/playlists_screen.dart';
|
||||
import 'services/logger_service.dart';
|
||||
import 'services/offline_mode.dart';
|
||||
import 'settings/settings_screen.dart';
|
||||
import 'shared/theme.dart';
|
||||
|
||||
late final MeloAudioHandler _handler;
|
||||
@@ -75,35 +74,37 @@ class HomeShell extends StatefulWidget {
|
||||
class _HomeShellState extends State<HomeShell> {
|
||||
int _index = 0;
|
||||
|
||||
static const _tabs = <Widget>[
|
||||
NowPlayingScreen(),
|
||||
LibraryScreen(),
|
||||
PlaylistsScreen(),
|
||||
SearchScreen(),
|
||||
SettingsScreen(),
|
||||
];
|
||||
void _goTo(int index) => setState(() => _index = index);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tabs = <Widget>[
|
||||
MyMusicScreen(
|
||||
onSearchTap: () => _goTo(1),
|
||||
onFavoritesTap: () => _goTo(2),
|
||||
),
|
||||
const SearchScreen(),
|
||||
const FavoritesScreen(),
|
||||
const DownloadsScreen(),
|
||||
];
|
||||
return Scaffold(
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(child: IndexedStack(index: _index, children: _tabs)),
|
||||
if (_index != 0) const MiniPlayer(),
|
||||
Expanded(child: IndexedStack(index: _index, children: tabs)),
|
||||
const MiniPlayer(),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
currentIndex: _index,
|
||||
onTap: (i) => setState(() => _index = i),
|
||||
onTap: _goTo,
|
||||
items: const [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.play_circle_outline), label: 'Player'),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.library_music), label: 'Bibliothek'),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.playlist_play), label: 'Playlisten'),
|
||||
icon: Icon(Icons.headphones), label: 'Meine Musik'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Suche'),
|
||||
BottomNavigationBarItem(icon: Icon(Icons.settings), label: 'Settings'),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.favorite_border), label: 'Favoriten'),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.download_outlined), label: 'Download'),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user