added audio output for demo songs since spotify api doesnt support audio streaming
This commit is contained in:
parent
6b93f1206d
commit
a91654df03
14 changed files with 1261 additions and 77 deletions
|
@ -5,6 +5,8 @@ import 'pages/voting_page.dart';
|
|||
import 'pages/group_page.dart';
|
||||
import 'services/music_queue_service.dart';
|
||||
import 'services/network_group_service.dart';
|
||||
import 'services/spam_protection_service.dart';
|
||||
import 'services/audio_service.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
|
@ -20,6 +22,8 @@ class MyApp extends StatelessWidget {
|
|||
providers: [
|
||||
ChangeNotifierProvider(create: (context) => MusicQueueService()),
|
||||
ChangeNotifierProvider(create: (context) => NetworkGroupService()),
|
||||
ChangeNotifierProvider(create: (context) => SpamProtectionService()),
|
||||
ChangeNotifierProvider(create: (context) => AudioService()),
|
||||
],
|
||||
child: MaterialApp(
|
||||
title: 'SleepySound',
|
||||
|
@ -81,10 +85,6 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
title: Text(_getPageTitle()),
|
||||
),
|
||||
body: _getSelectedPage(),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
|
@ -110,17 +110,4 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getPageTitle() {
|
||||
switch (_selectedIndex) {
|
||||
case 0:
|
||||
return 'Now Playing';
|
||||
case 1:
|
||||
return 'Voting';
|
||||
case 2:
|
||||
return 'Group';
|
||||
default:
|
||||
return 'Now Playing';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue