ExactAssetImage constructor Null safety

const ExactAssetImage(
  1. String assetName,
  2. {double scale = 1.0,
  3. AssetBundle? bundle,
  4. 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.


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