AssetImage constructor

const AssetImage(
  1. String assetName,
  2. {AssetBundle? bundle,
  3. String? package}
)

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

The assetName argument should name the main asset from the set of images to choose from. The package argument must be non-null when fetching an asset that is included in package. See the documentation for the AssetImage class itself for details.

Implementation

const AssetImage(
  this.assetName, {
  this.bundle,
  this.package,
});