Skip to content

PanelModal

Category: UI

Source: panel_modal.dart

Enums

PanelStyle

ValueDescription
tape
simple
heavy

BarrierStyle

ValueDescription
dim
obscure
none

Classes

sealed PanelSize

Methods

int resolve(int available)

PanelFixed

Constructor

dart
PanelFixed(this.size)

Properties

PropertyTypeDescription
sizeint

Methods

int resolve(int available)

PanelFluid

Constructor

dart
PanelFluid(this.maxPercent, this.minSize, {this.margin = 2})

Properties

PropertyTypeDescription
maxPercentdouble
minSizeint
marginint

Methods

int resolve(int available)

abstract PanelOverlay

Properties

PropertyTypeDescription
isCompletebool get
isCompletebool get

Methods

bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List&lt;String&gt; backgroundLines,

)`

void cancel()

PanelModal

Constructor

dart
PanelModal({
    required this.title,
    required List<String> lines,
    this.box = Box.light,
    this.borderColor = '\x1b[2m',
    this.barrier = BarrierStyle.dim,
    PanelSize? width,
    PanelSize? height,
    this.dismissable = true,
    this.selectable = false,
    this.onOpenInEditor,
    int initialIndex = 0,
  })
dart
PanelModal.responsive({
    required this.title,
    required this.linesBuilder,
    this.box = Box.light,
    this.borderColor = '\x1b[2m',
    this.barrier = BarrierStyle.dim,
    PanelSize? width,
    PanelSize? height,
    this.dismissable = true,
    this.selectable = false,
    this.onOpenInEditor,
    int initialIndex = 0,
  })

Properties

PropertyTypeDescription
titleString
boxBox
borderColorString
barrierBarrierStyle
dismissablebool
selectablebool
linesList&lt;String&gt; getSnapshot of the current lines at an assumed 80-col content width. Prefer linesBuilder(width) for width-aware access.
scrollOffsetint get
isCompletebool get
resultFuture&lt;void&gt; get
selectedIndexint get
selectionFuture&lt;int?&gt; get
linesList&lt;String&gt; getSnapshot of the current lines at an assumed 80-col content width. Prefer linesBuilder(width) for width-aware access.
scrollOffsetint get
isCompletebool get
resultFuture&lt;void&gt; get
selectedIndexint get
selectionFuture&lt;int?&gt; get

Methods

void dismiss()
void cancel()
bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List&lt;String&gt; backgroundLines,

)`

Functions

`List<String> renderBorder(

PanelStyle style, int width, int height, String title, )`

List&lt;String&gt; applyBarrier(BarrierStyle style, List&lt;String&gt; lines)

Released under the MIT License.