navigation bar and colours custamized

This commit is contained in:
Leon Astner 2025-08-02 03:42:56 +02:00
parent 5c84b2fb59
commit 1ce7aea6b5
6 changed files with 167 additions and 51 deletions

View file

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'pages/now_playing_page.dart';
import 'pages/library_page.dart';
import 'pages/settings_page.dart';
import 'pages/voting_page.dart';
import 'pages/group_page.dart';
void main() {
runApp(const MyApp());
@ -16,8 +16,23 @@ class MyApp extends StatelessWidget {
return MaterialApp(
title: 'SleepySound',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFF6366F1),
brightness: Brightness.dark,
),
scaffoldBackgroundColor: const Color(0xFF121212),
appBarTheme: const AppBarTheme(
backgroundColor: Color(0xFF1E1E1E),
foregroundColor: Colors.white,
),
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
backgroundColor: Color(0xFF1E1E1E),
selectedItemColor: Color(0xFF6366F1),
unselectedItemColor: Colors.grey,
type: BottomNavigationBarType.fixed,
),
),
home: const MyHomePage(title: 'Now Playing'),
);
@ -46,9 +61,9 @@ class _MyHomePageState extends State<MyHomePage> {
case 0:
return const NowPlayingPage();
case 1:
return const LibraryPage();
return const VotingPage();
case 2:
return const SettingsPage();
return const GroupPage();
default:
return const NowPlayingPage();
}
@ -69,7 +84,7 @@ class _MyHomePageState extends State<MyHomePage> {
label: 'Now Playing',
),
BottomNavigationBarItem(
icon: Icon(Icons.library_music),
icon: Icon(Icons.how_to_vote),
label: 'Voting',
),
BottomNavigationBarItem(
@ -78,7 +93,10 @@ class _MyHomePageState extends State<MyHomePage> {
),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.deepPurple,
backgroundColor: const Color(0xFF1E1E1E),
selectedItemColor: const Color(0xFF6366F1),
unselectedItemColor: Colors.grey,
type: BottomNavigationBarType.fixed,
onTap: _onItemTapped,
),
);