resolve method

Future<ImageProvider<Object>?> resolve(
  1. NowPlayingTrack track
)
override

Returns an ImageProvider for a given NowPlayingTrack

If an image cannot be resolved, or does not need to be for some reason (e.g. we're happy with the image that has already been found in the system metadata) resolve should return null

Implementation

Future<ImageProvider?> resolve(NowPlayingTrack track) async {
  final provider = await spotifyImageResolver.resolve(track);
  if (provider is ImageProvider) return provider;
  return nativeImageResolver.resolve(track);
}