diff --git a/assets/angle-left-solid.svg b/assets/angle-left-solid.svg
deleted file mode 100644
index 39198fc6..00000000
--- a/assets/angle-left-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/backward-solid.svg b/assets/backward-solid.svg
deleted file mode 100644
index e199fd0e..00000000
--- a/assets/backward-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/download-solid.svg b/assets/download-solid.svg
deleted file mode 100644
index 0c6730bc..00000000
--- a/assets/download-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/forward-solid.svg b/assets/forward-solid.svg
deleted file mode 100644
index f8cb3912..00000000
--- a/assets/forward-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/heart-regular.svg b/assets/heart-regular.svg
deleted file mode 100644
index d6dabd0d..00000000
--- a/assets/heart-regular.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/heart-solid.svg b/assets/heart-solid.svg
deleted file mode 100644
index b6b04b69..00000000
--- a/assets/heart-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/icon.svg b/assets/icon.svg
deleted file mode 100644
index 11da7b37..00000000
--- a/assets/icon.svg
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
diff --git a/assets/loading-spinner.gif b/assets/loading-spinner.gif
deleted file mode 100644
index fb9c052f..00000000
Binary files a/assets/loading-spinner.gif and /dev/null differ
diff --git a/assets/music-solid.svg b/assets/music-solid.svg
deleted file mode 100644
index 6f6314fa..00000000
--- a/assets/music-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/pause-solid.svg b/assets/pause-solid.svg
deleted file mode 100644
index 7cf24971..00000000
--- a/assets/pause-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/play-solid.svg b/assets/play-solid.svg
deleted file mode 100644
index bcd81f7a..00000000
--- a/assets/play-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/random-solid.svg b/assets/random-solid.svg
deleted file mode 100644
index 92d38f14..00000000
--- a/assets/random-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/search-solid.svg b/assets/search-solid.svg
deleted file mode 100644
index f41bbdd4..00000000
--- a/assets/search-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/setting-cog.svg b/assets/setting-cog.svg
deleted file mode 100644
index c85ffb29..00000000
--- a/assets/setting-cog.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/stop-solid.svg b/assets/stop-solid.svg
deleted file mode 100644
index 3d82c324..00000000
--- a/assets/stop-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/assets/times-solid.svg b/assets/times-solid.svg
deleted file mode 100644
index 81446224..00000000
--- a/assets/times-solid.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/lib/components/Home.dart b/lib/components/Home.dart
index 0f6cf3e8..6e87b34a 100644
--- a/lib/components/Home.dart
+++ b/lib/components/Home.dart
@@ -227,16 +227,14 @@ class _HomeState extends State {
// contents of the spotify
if (_selectedIndex == 0)
Expanded(
- child: Scrollbar(
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: PagedListView(
- pagingController: _pagingController,
- builderDelegate: PagedChildBuilderDelegate(
- itemBuilder: (context, item, index) {
- return CategoryCard(item);
- },
- ),
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: PagedListView(
+ pagingController: _pagingController,
+ builderDelegate: PagedChildBuilderDelegate(
+ itemBuilder: (context, item, index) {
+ return CategoryCard(item);
+ },
),
),
),
diff --git a/lib/components/Login.dart b/lib/components/Login.dart
index 5fee5046..9e415094 100644
--- a/lib/components/Login.dart
+++ b/lib/components/Login.dart
@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:spotify/spotify.dart' hide Image;
import 'package:spotube/components/Home.dart';
+import 'package:spotube/components/PageWindowTitleBar.dart';
import 'package:spotube/helpers/server_ipc.dart';
import 'package:spotube/models/LocalStorageKeys.dart';
import 'package:spotube/provider/Auth.dart';
@@ -81,68 +82,75 @@ class _LoginState extends State {
return Consumer(
builder: (context, authState, child) {
return Scaffold(
- body: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Image.asset(
- "assets/spotube-logo.png",
- width: 400,
- height: 400,
- ),
- Text("Add your spotify credentials to get started",
- style: Theme.of(context).textTheme.headline4),
- const Text(
- "Don't worry, any of your credentials won't be collected or shared with anyone"),
- const SizedBox(
- height: 10,
- ),
- Container(
- constraints: const BoxConstraints(
- maxWidth: 400,
- ),
+ body: Column(
+ children: [
+ const PageWindowTitleBar(),
+ Expanded(
+ child: Center(
child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
children: [
- TextField(
- decoration: const InputDecoration(
- hintText: "Spotify Client ID",
- label: Text("ClientID"),
- ),
- onChanged: (value) {
- setState(() {
- clientId = value;
- });
- },
+ Image.asset(
+ "assets/spotube-logo.png",
+ width: 400,
+ height: 400,
),
+ Text("Add your spotify credentials to get started",
+ style: Theme.of(context).textTheme.headline4),
+ const Text(
+ "Don't worry, any of your credentials won't be collected or shared with anyone"),
const SizedBox(
height: 10,
),
- TextField(
- decoration: const InputDecoration(
- hintText: "Spotify Client Secret",
- label: Text("Client Secret"),
+ Container(
+ constraints: const BoxConstraints(
+ maxWidth: 400,
+ ),
+ child: Column(
+ children: [
+ TextField(
+ decoration: const InputDecoration(
+ hintText: "Spotify Client ID",
+ label: Text("ClientID"),
+ ),
+ onChanged: (value) {
+ setState(() {
+ clientId = value;
+ });
+ },
+ ),
+ const SizedBox(
+ height: 10,
+ ),
+ TextField(
+ decoration: const InputDecoration(
+ hintText: "Spotify Client Secret",
+ label: Text("Client Secret"),
+ ),
+ onChanged: (value) {
+ setState(() {
+ clientSecret = value;
+ });
+ },
+ ),
+ const SizedBox(
+ height: 10,
+ ),
+ ElevatedButton(
+ onPressed: () {
+ handleLogin(authState);
+ },
+ child: const Text("Submit"),
+ )
+ ],
),
- onChanged: (value) {
- setState(() {
- clientSecret = value;
- });
- },
),
- const SizedBox(
- height: 10,
- ),
- ElevatedButton(
- onPressed: () {
- handleLogin(authState);
- },
- child: const Text("Submit"),
- )
],
),
),
- ],
- ),
+ ),
+ ],
),
);
},
diff --git a/lib/components/Player.dart b/lib/components/Player.dart
index a23283fe..de0dd5bd 100644
--- a/lib/components/Player.dart
+++ b/lib/components/Player.dart
@@ -81,7 +81,7 @@ class _PlayerState extends State {
var matchedTracks = playback.currentPlaylist?.tracks.where(
(track) {
- return track.name == mediaTitle &&
+ return track.name?.replaceAll("-", " ") == mediaTitle &&
artistsToString(track.artists ?? []) == mediaArtists;
},
) ??
@@ -147,7 +147,7 @@ class _PlayerState extends State {
@override
Widget build(BuildContext context) {
return Container(
- color: Colors.white,
+ color: Theme.of(context).backgroundColor,
child: Consumer(
builder: (context, playback, widget) {
if (playback.currentPlaylist != null) {
diff --git a/lib/components/PlayerControls.dart b/lib/components/PlayerControls.dart
index 9a56d573..7a872e9f 100644
--- a/lib/components/PlayerControls.dart
+++ b/lib/components/PlayerControls.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
import 'package:mpv_dart/mpv_dart.dart';
import 'package:spotube/helpers/zero-pad-num-str.dart';
diff --git a/lib/components/PlaylistCard.dart b/lib/components/PlaylistCard.dart
index fdb50f4c..fa5f18b2 100644
--- a/lib/components/PlaylistCard.dart
+++ b/lib/components/PlaylistCard.dart
@@ -28,15 +28,14 @@ class _PlaylistCardState extends State {
constraints: const BoxConstraints(maxWidth: 200),
child: Ink(
decoration: BoxDecoration(
- color: Colors.white,
+ color: Theme.of(context).backgroundColor,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
- blurRadius: 10,
- offset: const Offset(0, 3),
- spreadRadius: 5,
- color: Colors.grey.shade300,
- )
+ blurRadius: 10,
+ offset: const Offset(0, 3),
+ spreadRadius: 5,
+ color: Theme.of(context).shadowColor)
],
),
child: Column(
diff --git a/lib/main.dart b/lib/main.dart
index 16d71053..d30050ae 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -64,11 +64,12 @@ class MyApp extends StatelessWidget {
debugShowCheckedModeBanner: false,
title: 'Spotube',
theme: ThemeData(
- primaryColor: Colors.greenAccent[400],
+ primaryColor: Colors.green,
primarySwatch: Colors.green,
buttonTheme: const ButtonThemeData(
buttonColor: Colors.green,
),
+ shadowColor: Colors.grey[300],
textTheme: TextTheme(
bodyText1: TextStyle(color: Colors.grey[850]),
headline1: TextStyle(color: Colors.grey[850]),
@@ -104,6 +105,36 @@ class MyApp extends StatelessWidget {
),
),
),
+ darkTheme: ThemeData(
+ brightness: Brightness.dark,
+ primaryColor: Colors.green,
+ primarySwatch: Colors.green,
+ backgroundColor: Colors.blueGrey[900],
+ scaffoldBackgroundColor: Colors.blueGrey[900],
+ dialogBackgroundColor: Colors.blueGrey[800],
+ shadowColor: Colors.black12,
+ buttonTheme: const ButtonThemeData(
+ buttonColor: Colors.green,
+ ),
+ inputDecorationTheme: InputDecorationTheme(
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Colors.green[400]!,
+ width: 2.0,
+ ),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Colors.grey[800]!,
+ ),
+ ),
+ ),
+ navigationRailTheme: NavigationRailThemeData(
+ backgroundColor: Colors.blueGrey[800],
+ unselectedIconTheme: const IconThemeData(opacity: 1),
+ ),
+ ),
+ themeMode: ThemeMode.system,
home: const Home(),
),
);
diff --git a/playlist.txt b/playlist.txt
deleted file mode 100644
index 2405fcc1..00000000
--- a/playlist.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-ytdl://ytsearch:Ghost - Justing Beiber
-ytdl://ytsearch:Dura - Daddy Yankee
\ No newline at end of file