unregister method

void unregister(
  1. String containerId,
  2. RenderFluentParagraph render
)

Removes render from the registry ONLY if it is actually the one currently registered for containerId. This prevents that, during reparenting of a node with the same id (e.g. outdent of a ListItem that reuses the Paragraph), the late detach of the old render deletes the entry of the new render already registered, making the node unresolvable.

Implementation

void unregister(String containerId, RenderFluentParagraph render) {
  if (identical(_renders[containerId], render)) {
    _renders.remove(containerId);
  }
}