mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
Player._playTrack unsafe null modifier removed
SpotifyDI was using ChangeNotifier as mixin & wasn't extending
This commit is contained in:
parent
25854c843f
commit
e6daba77bd
@ -138,7 +138,7 @@ class _PlayerState extends State<Player> 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(
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user