AdaptiveContainerBuilder constructor
AdaptiveContainerBuilder({
- Key? key,
- AlignmentGeometry? alignment,
- EdgeInsetsGeometry? padding,
- Color? color,
- Decoration? decoration,
- Decoration? foregroundDecoration,
- EdgeInsetsGeometry? margin,
- Matrix4? transform,
- double? height,
- Clip clipBehavior = Clip.none,
- required AdaptiveWidgetBuilder builder,
Creates a widget that combines common painting, positioning, and sizing widgets.
The color
and decoration
arguments cannot both be supplied, since
it would potentially result in the decoration drawing over the background
color. To supply a decoration with a color, use decoration: BoxDecoration(color: color)
.
Implementation
AdaptiveContainerBuilder({
Key? key,
this.alignment,
this.padding,
this.color,
this.decoration,
this.foregroundDecoration,
this.margin,
this.transform,
this.height,
this.clipBehavior = Clip.none,
required this.builder,
}) : assert(margin == null || margin.isNonNegative),
assert(padding == null || padding.isNonNegative),
assert(decoration == null || decoration.debugAssertIsValid()),
assert(
color == null || decoration == null,
'Cannot provide both a color and a decoration\n'
'To provide both, use "decoration: BoxDecoration(color: color)".'),
super(key: key);