layout method
Implementation
@override
ColumnLayout layout(
Widget child, Context context, BoxConstraints constraints) {
if (flex != null) {
return ColumnLayout(0, flex);
}
child.layout(context, const BoxConstraints());
assert(child.box != null);
final calculatedWidth =
child.box!.width == double.infinity ? 0.0 : child.box!.width;
final childFlex = flex ??
(child is Expanded
? child.flex.toDouble()
: (child.box!.width == double.infinity ? 1 : 0));
return ColumnLayout(calculatedWidth, childFlex);
}