fix: some fixes

This commit is contained in:
2022-03-02 00:07:51 +02:00
parent 7859339a4b
commit dc186a3037
4 changed files with 49 additions and 38 deletions
-7
View File
@@ -112,19 +112,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
void onData(NotificationEvent event) {
// TODO: if the app is in the background, only update our notif
// if the app is in the foreground, update the notif, and
// fetch the new lyrics and display them.
setState(() {
currentlyPlaying = event;
});
}
void startListening() {
// TODO: make the FAB start and stop a local notification service
// that keeps track of which song is playing
// and if pressed will fetch the lyrics and display them.
_notifications = AndroidNotificationListener();
_subscription = _notifications.notificationStream.listen(onData);