invokeGetArtwork method

Future<Artwork> invokeGetArtwork(
  1. String path
)

Implementation

Future<Artwork> invokeGetArtwork(String path) async {
  final exists = await (_channel.invokeMethod<bool>('artwork_exists', path))?? false ;

  if (!exists) {
    return NativeArtwork(false, null);
  }

  final dataFunc = () => _channel.invokeMethod<Uint8List>('artwork', path);
  return NativeArtwork(true, dataFunc);
}