Skip to content
Snippets Groups Projects
Commit 0a3f66e9 authored by Erik Hinkelmanns's avatar Erik Hinkelmanns
Browse files

- cleanup

parent 17b68264
No related branches found
No related tags found
No related merge requests found
......@@ -156,7 +156,7 @@ class HomePage extends StatelessWidget {
}
}
//Todo Daniel
Future<void> queue(String songId) async {
try {
await SpotifySdk.queue(
......@@ -168,9 +168,10 @@ class HomePage extends StatelessWidget {
}
}
Future<void> play() async {
//Todo Daniel
Future<void> play(String songId) async {
try {
await SpotifySdk.play(spotifyUri: 'spotify:track:0RT1qESYHlNcUJI0Yo5Hzl');
await SpotifySdk.play(spotifyUri: 'spotify:track:$songId');
} on PlatformException catch (e) {
setStatus(e.code, message: e.message);
} on MissingPluginException {
......@@ -290,21 +291,3 @@ class ControlButtons extends StatelessWidget {
}
}
}
Color darken(Color color, [double amount = .1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslDark = hsl.withLightness((hsl.lightness - amount).clamp(0.0, 1.0));
return hslDark.toColor();
}
Color ligten(Color color, [double amount = .1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslLight = hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0));
return hslLight.toColor();
}
......@@ -163,3 +163,21 @@ class MusicBar extends StatelessWidget {
}
}
}
Color darken(Color color, [double amount = .1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslDark = hsl.withLightness((hsl.lightness - amount).clamp(0.0, 1.0));
return hslDark.toColor();
}
Color ligten(Color color, [double amount = .1]) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslLight = hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0));
return hslLight.toColor();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment