handleGetMatchedStylesForNode method

void handleGetMatchedStylesForNode(
  1. int? id,
  2. Map<String, dynamic> params
)

Implementation

void handleGetMatchedStylesForNode(int? id, Map<String, dynamic> params) {
  int nodeId = view.getTargetIdByNodeId(params['nodeId']);
  BindingObject? element = view.getBindingObject<BindingObject>(Pointer.fromAddress(nodeId));
  if (element is Element) {
    MatchedStyles matchedStyles = MatchedStyles(
      inlineStyle: buildMatchedStyle(element),
    );
    sendToFrontend(id, matchedStyles);
  }
}