localAsset method

Image localAsset()

Get the image from public/images

Implementation

Image localAsset() {
  assert(image is AssetImage, "Image must be an AssetImage");
  if (image is AssetImage) {
    AssetImage assetImage = (image as AssetImage);
    return Image.asset(
      getImageAsset(assetImage.assetName),
      fit: fit,
      width: width,
      height: height,
      alignment: alignment,
      centerSlice: centerSlice,
      color: color,
      colorBlendMode: colorBlendMode,
      excludeFromSemantics: excludeFromSemantics,
      filterQuality: filterQuality,
      frameBuilder: frameBuilder,
      gaplessPlayback: gaplessPlayback,
      matchTextDirection: matchTextDirection,
      repeat: repeat,
      semanticLabel: semanticLabel,
      errorBuilder: errorBuilder,
      isAntiAlias: isAntiAlias,
      package: assetImage.package,
    );
  }
  return this;
}