visit method
ConstructorCall
visit(
- covariant SizedBox widget
)
override
Implementation
@override
ConstructorCall visit(SizedBox widget) {
if (widget.width == double.infinity && widget.width == double.infinity) {
return ConstructorCall('SizedBoxExpand',
NotNullMap.from({'child': ArgumentEncoders.widget(widget.child)}));
}
if (widget.width == 0 && widget.height == 0) {
return ConstructorCall('SizedBoxShrink',
NotNullMap.from({'child': ArgumentEncoders.widget(widget.child)}));
}
return ConstructorCall(
'SizedBox',
NotNullMap.from({
'width': widget.width,
'height': widget.height,
'child': ArgumentEncoders.widget(widget.child),
}));
}