runWithFrame method
PromptResult
runWithFrame({
- required FrameView frame,
- required void content(
- FrameContext ctx
- required KeyBindings bindings,
Runs a prompt with FrameView-based rendering.
Convenience method that combines PromptRunner with FrameView for the most common use case.
Example:
final runner = PromptRunner();
final result = runner.runWithFrame(
frame: FrameView(title: 'My Prompt', theme: theme, bindings: bindings),
content: (ctx) {
ctx.gutterLine('Content here');
},
bindings: bindings,
);
Implementation
PromptResult runWithFrame({
required FrameView frame,
required void Function(FrameContext ctx) content,
required KeyBindings bindings,
}) {
return runWithBindings(
render: (out) => frame.render(out, content),
bindings: bindings,
);
}