NxBackgroundCard constructor
const
NxBackgroundCard({
- required Widget child,
- double? height,
- double? width,
- Color? backgroundColor,
- EdgeInsetsGeometry? margin,
- double? elevation,
- ShapeBorder? shape,
- bool isScrollable = false,
- Key? key,
Creates a background card that sizes relative to screen dimensions.
child
is the widget to display inside the cardheight
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 colormargin
defines the space around the cardelevation
controls the card's shadowshape
defines the card's shape and border radiusisScrollable
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,
});