visit method
Implementation
@override
ConstructorCall visit(AnimatedContainer widget) {
Map<String, dynamic>? constraints =
ArgumentEncoders.boxConstraints(widget.constraints);
NotNullMap<String, dynamic> props = NotNullMap.from({
'duration': ArgumentEncoders.duration(widget.duration),
'curve': ArgumentEncoders.curve(widget.curve),
'alignment': ArgumentEncoders.alignment(widget.alignment),
'padding': ArgumentEncoders.edgeInsets(widget.padding),
// TODO: if decoration is null, color will be added to new generated decoration, cannot get color from AnimatedContainer, need to be fixed. It's the other reason to use code_builder get props
// writeIfNotNull(widget.color, (value) { })
// 'color': ;
'decoration': ArgumentEncoders.decoration(widget.decoration),
'foregroundDecoration':
ArgumentEncoders.decoration(widget.foregroundDecoration),
'width': constraints?['width'],
'height': constraints?['height'],
'constraints': ArgumentEncoders.boxConstraints(widget.constraints),
'margin': ArgumentEncoders.edgeInsets(widget.margin),
'transform': ArgumentEncoders.matrix(widget.transform),
'transformAlignment':
ArgumentEncoders.alignment(widget.transformAlignment),
'clipBehavior': ArgumentEncoders.enumValue<Clip>(widget.clipBehavior),
'onEnd': DataSourceEncoder.voidHandler(widget.onEnd),
'child': ArgumentEncoders.widget(widget.child),
});
return ConstructorCall('Container', props);
}