BackgroundImageDecoration constructor

const BackgroundImageDecoration({
  1. required ImageProvider<Object> image,
  2. BoxFit? fit = BoxFit.cover,
  3. ColorFilter? colorFilter,
  4. double opacity = 0.5,
})

Implementation

const BackgroundImageDecoration({
  required super.image, // The image provider for the background image
  super.fit = BoxFit.cover, // How the image should be fitted in the box
  super.colorFilter, // An optional color filter to apply to the image
  super.opacity = 0.5, // The opacity of the image
});