resolveObjectPosition static method
Implementation
static Alignment resolveObjectPosition(String? position) {
// Syntax: object-position: <position>
// position: From one to four values that define the 2D position of the element. Relative or absolute offsets can be used.
// <position> = [ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]
if (position != null) {
List<String?> values = CSSStyleProperty.getPositionValues(position);
return Alignment(_getAlignmentValueFromString(values[0]!), _getAlignmentValueFromString(values[1]!));
}
// The default value for object-position is 50% 50%
return Alignment.center;
}