BorderStyle class Styling

Defines the characters used to draw borders in a terminal UI.

Each instance specifies the characters for the corners and edges of a rectangular border.

Properties

  • topLeft: Character for the top-left corner.
  • topRight: Character for the top-right corner.
  • bottomLeft: Character for the bottom-left corner.
  • bottomRight: Character for the bottom-right corner.
  • horizontal: Character for the horizontal edges.
  • vertical: Character for the vertical edges.

Responsibilities

  • Provide a reusable set of border characters for drawing UI elements.
  • Support different visual styles such as thin, thick, rounded, and empty (no border).

Examples

final border = BorderStyle.thin;
print(border.topLeft); // ┌
print(border.horizontal); // ─

Use with a border renderer:

BorderRenderer(style: BorderStyle.rounded).draw(buffer, bounds, drawChild);

See Also

Constructors

BorderStyle.new({required String topLeft, required String topRight, required String bottomLeft, required String bottomRight, required String horizontal, required String vertical})
Creates a new BorderStyle with the specified corner and edge characters.
const

Properties

bottomLeft String
Character for the bottom-left corner of the border.
final
bottomRight String
Character for the bottom-right corner of the border.
final
hashCode int
The hash code for this object.
no setterinherited
horizontal String
Character for the horizontal edges of the border.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
topLeft String
Character for the top-left corner of the border.
final
topRight String
Character for the top-right corner of the border.
final
vertical String
Character for the vertical edges of the border.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

empty → const BorderStyle
Empty border style (no visible border).
rounded → const BorderStyle
Rounded corners border style.
thick → const BorderStyle
Thick line border style.
thin → const BorderStyle
Thin line border style.