NxBackgroundLayer constructor

const NxBackgroundLayer({
  1. bool fromAssets = true,
  2. Color? backgroundColor,
  3. String? imagePath,
  4. double imageShift = 0.0,
  5. double imageOpacity = 1,
  6. Key? key,
})

Creates a background layer widget.

  • fromAssets determines if the image should be loaded from assets
  • backgroundColor sets a solid background color
  • imagePath specifies the path to the image (asset or network URL)
  • imageShift adjusts the vertical position of the background
  • imageOpacity sets the opacity of the background image

Implementation

const NxBackgroundLayer({
  this.fromAssets = true,
  this.backgroundColor,
  this.imagePath,
  this.imageShift = 0.0,
  this.imageOpacity = 1,
  super.key,
});