show method

void show(
  1. void content(
    1. FrameContext ctx
    )
)

Renders to stdout and returns immediately.

Use for display-only views that don't need interactivity. Creates a RenderOutput internally and renders the frame.

Example:

final frame = FrameView(title: 'Stats', theme: theme);
frame.show((ctx) {
  ctx.statItem('Tests', '98%', icon: '✔', tone: StatTone.success);
  ctx.statItem('Coverage', '85%', icon: '◎', tone: StatTone.info);
});

Implementation

void show(void Function(FrameContext ctx) content) {
  final out = RenderOutput();
  render(out, content);
}