newStyleFromProps function

Map<String, dynamic> newStyleFromProps(
  1. Map? props
)

Returns a copy of the DomPropsMixin.style map found in props.

Returns an empty map if props or its style map are null.

Implementation

Map<String, dynamic> newStyleFromProps(Map? props) {
  if (props == null) return <String, dynamic>{};

  var existingStyle = domProps(props).style;
  return existingStyle == null ? <String, dynamic>{} : Map.from(existingStyle);
}