getPropertyValue method

  1. @override
String getPropertyValue(
  1. String propertyName
)
override

Returns the property value given a property name. value is a String containing the value of the property. If not set, returns the empty string.

Implementation

@override
String getPropertyValue(String propertyName) {
  CSSPropertyID? propertyID = CSSPropertyNameMap[propertyName] ?? CSSPropertyNameMap[kebabize(propertyName)];
  if (propertyID == null) {
    _element.ownerDocument.updateStyleIfNeeded();
    CSSRenderStyle? style = _element.computedStyle(_pseudoElementName);
    if (style == null) {
      return '';
    }
    final String? gridValue = _valueForGridProperty(propertyName, style);
    return gridValue ?? '';
  }
  return _valueForPropertyInStyle(propertyID, needUpdateStyle: true);
}