setAsset method

void setAsset(
  1. String asset, {
  2. String? package,
  3. MediaType? type,
})

Implementation

void setAsset(String asset, {String? package, MediaType? type}) {
  final uri = PlatformEx.assetUri(asset, package: package);
  if (type == null) {
    media = uri;
  } else {
    setMedia(uri, type);
  }
}