props property
Converts box decoration attributes to a CSS style map.
Implementation
@override
Map<String, String> get props => {
'display': ?display?.value,
'background-color': ?backgroundColor?.value,
'background-image': ?_normalizedBackgroundImage,
'background-size': ?_backgroundImageSize,
'background-position': ?imagePosition?.css,
'color': ?foregroundColor?.value,
'opacity': ?opacity?.toCleanString,
'overflow': ?switch (clip) {
true => 'hidden',
false => 'visible',
null => null,
},
...?borderRadius?.props,
...?border?.props,
...?padding?.pProps,
...?margin?.mProps,
...?position?.props,
...?shadow?.props,
...?gradient?.props,
if (alignment != null) ...{
...NakiAlignProps.mapAlignment(alignment!),
'display': 'flex',
},
};