RawNode.withKey constructor

RawNode.withKey(
  1. Node node
)

Implementation

factory RawNode.withKey(html.Node node) {
  return RawNode(
    node,
    key: switch (node) {
      html.Text() => ValueKey('text'),
      html.Element(:var tagName) => ValueKey('element:$tagName'),
      _ => null,
    },
  );
}