diff --git a/CHALLENGE_2/sleepysound/lib/main.dart b/CHALLENGE_2/sleepysound/lib/main.dart index ee52f93..3c2e2ab 100644 --- a/CHALLENGE_2/sleepysound/lib/main.dart +++ b/CHALLENGE_2/sleepysound/lib/main.dart @@ -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 { 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 { 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 { ), ], currentIndex: _selectedIndex, - selectedItemColor: Colors.deepPurple, + backgroundColor: const Color(0xFF1E1E1E), + selectedItemColor: const Color(0xFF6366F1), + unselectedItemColor: Colors.grey, + type: BottomNavigationBarType.fixed, onTap: _onItemTapped, ), ); diff --git a/CHALLENGE_2/sleepysound/lib/pages/group_page.dart b/CHALLENGE_2/sleepysound/lib/pages/group_page.dart new file mode 100644 index 0000000..06ce291 --- /dev/null +++ b/CHALLENGE_2/sleepysound/lib/pages/group_page.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class GroupPage extends StatelessWidget { + const GroupPage({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + color: const Color(0xFF121212), + child: const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.group, size: 100, color: Color(0xFF6366F1)), + SizedBox(height: 20), + Text( + 'Group', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + SizedBox(height: 10), + Text( + 'Manage your listening group', + style: TextStyle(color: Colors.grey), + ), + ], + ), + ), + ); + } +} diff --git a/CHALLENGE_2/sleepysound/lib/pages/library_page.dart b/CHALLENGE_2/sleepysound/lib/pages/library_page.dart index 559ca02..30ba4bf 100644 --- a/CHALLENGE_2/sleepysound/lib/pages/library_page.dart +++ b/CHALLENGE_2/sleepysound/lib/pages/library_page.dart @@ -1,23 +1,33 @@ import 'package:flutter/material.dart'; -class LibraryPage extends StatelessWidget { - const LibraryPage({super.key}); +class VotingPage extends StatelessWidget { + const VotingPage({super.key}); @override Widget build(BuildContext context) { - return const Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon(Icons.library_music, size: 100, color: Colors.deepPurple), - SizedBox(height: 20), - Text( - 'Library', - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - SizedBox(height: 10), - Text('Your music library'), - ], + return Container( + color: const Color(0xFF121212), + child: const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.how_to_vote, size: 100, color: Color(0xFF6366F1)), + SizedBox(height: 20), + Text( + 'Voting', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + SizedBox(height: 10), + Text( + 'Vote for the next song', + style: TextStyle(color: Colors.grey), + ), + ], + ), ), ); } diff --git a/CHALLENGE_2/sleepysound/lib/pages/now_playing_page.dart b/CHALLENGE_2/sleepysound/lib/pages/now_playing_page.dart index b340aa5..e353b0e 100644 --- a/CHALLENGE_2/sleepysound/lib/pages/now_playing_page.dart +++ b/CHALLENGE_2/sleepysound/lib/pages/now_playing_page.dart @@ -5,19 +5,29 @@ class NowPlayingPage extends StatelessWidget { @override Widget build(BuildContext context) { - return const Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon(Icons.music_note, size: 100, color: Colors.deepPurple), - SizedBox(height: 20), - Text( - 'Now Playing', - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - SizedBox(height: 10), - Text('No music playing'), - ], + return Container( + color: const Color(0xFF121212), + child: const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.music_note, size: 100, color: Color(0xFF6366F1)), + SizedBox(height: 20), + Text( + 'Now Playing', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + SizedBox(height: 10), + Text( + 'No music playing', + style: TextStyle(color: Colors.grey), + ), + ], + ), ), ); } diff --git a/CHALLENGE_2/sleepysound/lib/pages/settings_page.dart b/CHALLENGE_2/sleepysound/lib/pages/settings_page.dart index 20e8a0f..06ce291 100644 --- a/CHALLENGE_2/sleepysound/lib/pages/settings_page.dart +++ b/CHALLENGE_2/sleepysound/lib/pages/settings_page.dart @@ -1,23 +1,33 @@ import 'package:flutter/material.dart'; -class SettingsPage extends StatelessWidget { - const SettingsPage({super.key}); +class GroupPage extends StatelessWidget { + const GroupPage({super.key}); @override Widget build(BuildContext context) { - return const Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon(Icons.settings, size: 100, color: Colors.deepPurple), - SizedBox(height: 20), - Text( - 'Settings', - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), - ), - SizedBox(height: 10), - Text('App settings'), - ], + return Container( + color: const Color(0xFF121212), + child: const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.group, size: 100, color: Color(0xFF6366F1)), + SizedBox(height: 20), + Text( + 'Group', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + SizedBox(height: 10), + Text( + 'Manage your listening group', + style: TextStyle(color: Colors.grey), + ), + ], + ), ), ); } diff --git a/CHALLENGE_2/sleepysound/lib/pages/voting_page.dart b/CHALLENGE_2/sleepysound/lib/pages/voting_page.dart new file mode 100644 index 0000000..30ba4bf --- /dev/null +++ b/CHALLENGE_2/sleepysound/lib/pages/voting_page.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class VotingPage extends StatelessWidget { + const VotingPage({super.key}); + + @override + Widget build(BuildContext context) { + return Container( + color: const Color(0xFF121212), + child: const Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.how_to_vote, size: 100, color: Color(0xFF6366F1)), + SizedBox(height: 20), + Text( + 'Voting', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + SizedBox(height: 10), + Text( + 'Vote for the next song', + style: TextStyle(color: Colors.grey), + ), + ], + ), + ), + ); + } +}