AssetImage constructor

const AssetImage(String assetName, { AssetBundle bundle, String package })

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

The assetName argument must not be null. It 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,
}) : assert(assetName != null);