diff --git a/lib/components/Player/Player.dart b/lib/components/Player/Player.dart index a638298c..dd689c6f 100644 --- a/lib/components/Player/Player.dart +++ b/lib/components/Player/Player.dart @@ -138,7 +138,7 @@ class _PlayerState extends State with WidgetsBindingObserver { Future _playTrack(Track currentTrack, Playback playback) async { try { if (currentTrack.id != _currentTrackId) { - Uri? parsedUri = Uri.tryParse(currentTrack.uri!); + Uri? parsedUri = Uri.tryParse(currentTrack.uri ?? ""); if (parsedUri != null && parsedUri.hasAbsolutePath) { await player .setAudioSource( diff --git a/lib/provider/SpotifyDI.dart b/lib/provider/SpotifyDI.dart index fcec7a46..f8723440 100644 --- a/lib/provider/SpotifyDI.dart +++ b/lib/provider/SpotifyDI.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:spotify/spotify.dart'; -class SpotifyDI with ChangeNotifier { +class SpotifyDI extends ChangeNotifier { SpotifyApi _spotifyApi; SpotifyDI(this._spotifyApi);