toHtml method

String toHtml()

Evaluates the tree through the SSR renderer and returns its rendered HTML string.

Useful for snapshot and substring assertions in tests.

expect(renderer.toHtml(), contains('<button type="submit">'));

Implementation

String toHtml() => renderToHtml(root);