handleGetInlineStylesForNode method

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

Implementation

void handleGetInlineStylesForNode(int? id, Map<String, dynamic> params) {
  int nodeId = view.getTargetIdByNodeId(params['nodeId']);
  BindingObject? element = view.getBindingObject<BindingObject>(Pointer.fromAddress(nodeId));

  if (element is Element) {
    InlinedStyle inlinedStyle = InlinedStyle(
      inlineStyle: buildInlineStyle(element),
      attributesStyle: buildAttributesStyle(element.attributes),
    );
    sendToFrontend(id, inlinedStyle);
  }
}