Modal<T extends InputBase>.yesNo constructor
Modal<T extends InputBase>.yesNo (})
Creates a simple modal with "Yes" (y key) and "No" (n key) actions. The modal panel will be rendered in the center of the Terminal that is used to render the modal's Layer.
Implementation
factory Modal.yesNo(String panelText,
{PanelBorder borderType = PanelBorder.single,
int? padding,
Color? panelTextColor,
Color? actionTextColor,
Color? backgroundColor,
Color? borderColor,
Object? yesResult,
Object? noResult}) {
var modal = Modal<T>.builder(panelText, _yesNoText,
borderType: borderType,
padding: padding ?? 1,
panelTextColor: panelTextColor,
actionTextColor: actionTextColor,
backgroundColor: backgroundColor,
borderColor: borderColor);
modal.onYes = () {
modal.ui.pop(yesResult);
};
modal.onNo = () {
modal.ui.pop(noResult);
};
return modal;
}