getMediaUrl method

Future<String?> getMediaUrl(
  1. AssetEntity entity, {
  2. PMProgressHandler? progressHandler,
})

Implementation

Future<String?> getMediaUrl(
  AssetEntity entity, {
  PMProgressHandler? progressHandler,
}) async {
  if (PlatformUtils.isOhos) {
    return entity.id;
  }
  final params = <String, dynamic>{
    'id': entity.id,
    'type': entity.typeInt,
  };
  _injectProgressHandlerParams(params, progressHandler);
  return _channel.invokeMethod(PMConstants.mGetMediaUrl, params);
}