Skip to content
Snippets Groups Projects
Commit 2c2b4515 authored by MagicalSpyto's avatar MagicalSpyto
Browse files

spotify zur moodpage hinzugefügt

parent 92ecf463
No related branches found
No related tags found
No related merge requests found
import 'dart:ffi';
import 'dart:io';
import 'package:ambient/firebase.dart';
import 'package:ambient/services/spotify.dart';
import 'main.dart';
import 'package:vector_math/vector_math.dart';
......@@ -74,10 +75,12 @@ class MoodPage extends State<StateMoodPage> {
}
//sendet den befehl music zum passenden genre rauszusuchen
_changeMusic() async {
Spotify spotify = Spotify();
//code zum musik ändern
String hexcode = selectedMood.red.toRadixString(16) + selectedMood.green.toRadixString(16) + selectedMood.blue.toRadixString(16);
String genre = await changeFirebase().getGenreByHex(hexcode);
print("genre = " + genre);
spotify.playGenre(genre);
}
//vergleicht zwei farben auf ähnlichkeit
_getColorDistance(Color c1, Color c2) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment