UnconstrainedBox constructor Null safety
- {Key? key,
- Widget? child,
- TextDirection? textDirection,
- AlignmentGeometry alignment = Alignment.center,
- Axis? constrainedAxis,
- Clip clipBehavior = Clip.none}
Creates a widget that imposes no constraints on its child, allowing it to render at its "natural" size. If the child overflows the parents constraints, a warning will be given in debug mode.
Implementation
const UnconstrainedBox({
super.key,
this.child,
this.textDirection,
this.alignment = Alignment.center,
this.constrainedAxis,
this.clipBehavior = Clip.none,
}) : assert(alignment != null),
assert(clipBehavior != null);