Panel class

Base panel class, with no border and optional padding and background

Implementers

Constructors

Panel(Rect _bounds, {Color? background, int padding = 0})
Panel.forContent(int width, int height, {Color? background, int padding = 0})
Create a Panel that is sized for the given content width and height, taking the given padding into consideration. The resulting panel will be positioned at (0, 0), so use a child Terminal to render it at the desired location.
factory

Properties

background Color?
Optional background color; uses the Terminal's background color by default
getter/setter pair
bounds Rect
Panel bounds
getter/setter pair
contentBounds Rect
Bounds Rect for the area available for content inside this panel
no setter
contentRenderer ↔ (void Function(Terminal)?)
Set a void Function(Terminal) implementation to render content within the panel. The provided Terminal is already set up such that it represents the full extent of the available content area of this Panel. You can use this to draw panels without subclassing and overriding renderContent.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
The width of the panel
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Terminal terminal) → void
Render the panel and its contents. This should be called from within Layer.render.
renderContent(Terminal terminal) → void
Render content within the panel. The provided terminal is already set up such that it represents the full extent of the available content area of this Panel. By default, this method calls contentRenderer if it is defined.
toString() String
A string representation of this object.
inherited

Operators

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