ExactAssetImage constructor

const ExactAssetImage(String assetName, { double scale: 1.0, AssetBundle bundle, String package })

Creates an object that fetches the given image from an asset bundle.

The assetName and scale arguments must not be null. The scale arguments defaults to 1.0. The bundle argument may be null, in which case the bundle provided in the ImageConfiguration passed to the resolve call will be used instead.

The package argument must be non-null when fetching an asset that is included in a package. See the documentation for the ExactAssetImage class itself for details.

Implementation

const ExactAssetImage(this.assetName, {
  this.scale = 1.0,
  this.bundle,
  this.package,
}) : assert(assetName != null),
     assert(scale != null);