child property
The widget below this widget in the tree.
This widget can only have one child. To lay out multiple children, let this
widget's child be a widget such as Row, Column, or Stack, which have a
children property, and then provide the children to that widget.
Implementation
@override
Widget? get child {
// Adjust the shadow offset if the background is translucent.
final shadow = this.shadow != null
? this.shadow?.copyWith(
blurStyle: BlurStyle.outer,
offset: const Offset(0, 0),
)
: this.shadow;
return Container(
width: width,
height: height,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(borderRadius),
boxShadow: shadow != null ? [shadow] : null,
),
child: super.child);
}