PanelModal
Category: UI
Source: panel_modal.dart
Enums
PanelStyle
| Value | Description |
|---|---|
tape | |
simple | |
heavy |
BarrierStyle
| Value | Description |
|---|---|
dim | |
obscure | |
none |
Classes
sealed PanelSize
Methods
int resolve(int available)
PanelFixed
Constructor
dart
PanelFixed(this.size)Properties
| Property | Type | Description |
|---|---|---|
size | int |
Methods
int resolve(int available)
PanelFluid
Constructor
dart
PanelFluid(this.maxPercent, this.minSize, {this.margin = 2})Properties
| Property | Type | Description |
|---|---|---|
maxPercent | double | |
minSize | int | |
margin | int |
Methods
int resolve(int available)
abstract PanelOverlay
Properties
| Property | Type | Description |
|---|---|---|
isComplete | bool get | |
isComplete | bool get |
Methods
bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List<String> 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
| Property | Type | Description |
|---|---|---|
title | String | |
box | Box | |
borderColor | String | |
barrier | BarrierStyle | |
dismissable | bool | |
selectable | bool | |
lines | List<String> get | Snapshot of the current lines at an assumed 80-col content width. Prefer linesBuilder(width) for width-aware access. |
scrollOffset | int get | |
isComplete | bool get | |
result | Future<void> get | |
selectedIndex | int get | |
selection | Future<int?> get | |
lines | List<String> get | Snapshot of the current lines at an assumed 80-col content width. Prefer linesBuilder(width) for width-aware access. |
scrollOffset | int get | |
isComplete | bool get | |
result | Future<void> get | |
selectedIndex | int get | |
selection | Future<int?> get |
Methods
void dismiss()
void cancel()
bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List<String> backgroundLines,
)`
Functions
`List<String> renderBorder(
PanelStyle style, int width, int height, String title, )`