Confirm class

A single-line y/n prompt. Pressing y / n (case-insensitive) submits the corresponding boolean; pressing Enter submits defaultValue.

Stateless on the framework side: the caller owns the boolean answer. Rendered as ? message (Y/n) or ? message (y/N) depending on the default. The widget occupies a single row.

Implemented types

Constructors

Confirm({required Key id, required String message, bool defaultValue = false, void onSubmit(bool value)?, String askPrefix = '?', Style? askPrefixStyle, Style? messageStyle, Style? hintStyle})
const

Properties

askPrefix → String
final
askPrefixStyle → Style?
final
defaultValue → bool
final
hashCode → int
The hash code for this object.
no setterinherited
height → int
no setteroverride
hintStyle → Style?
final
id → Key
final
isSkipped → bool
no setteroverride
message → String
final
messageStyle → Style?
final
onSubmit → void Function(bool value)?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onKey(KeyEvent event, RenderContext ctx) → bool
override
registerHitZones(Rect area, HitZoneSink sink) → void
override
render(Rect area, Buffer buffer, RenderContext ctx) → void
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited