NxBackgroundCard constructor

const NxBackgroundCard({
  1. required Widget child,
  2. double? height,
  3. double? width,
  4. Color? backgroundColor,
  5. EdgeInsetsGeometry? margin,
  6. double? elevation,
  7. ShapeBorder? shape,
  8. bool isScrollable = false,
  9. Key? key,
})

Creates a background card that sizes relative to screen dimensions.

  • child is the widget to display inside the card
  • height is the fraction of screen height to occupy (1.0 = full height)
  • width is the fraction of screen width to occupy (1.0 = full width)
  • backgroundColor sets the card's background color
  • margin defines the space around the card
  • elevation controls the card's shadow
  • shape defines the card's shape and border radius
  • isScrollable wraps content in SingleChildScrollView if true

Implementation

const NxBackgroundCard({
  required this.child,
  this.height,
  this.width,
  this.backgroundColor,
  this.margin,
  this.elevation,
  this.shape,
  this.isScrollable = false,
  super.key,
});