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

Merge remote-tracking branch 'origin/main' into music_player

# Conflicts:
#	lib/moodpage.dart
parents 31705b02 5640cfd0
No related branches found
No related tags found
No related merge requests found
......@@ -219,6 +219,7 @@ class HomePage extends StatelessWidget {
Future<void> checkIfAppIsActive(BuildContext context) async {
try {
var isActive = await SpotifySdk.isSpotifyAppActive;
final snackBar = SnackBar(
......
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);
//playGenre();
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