Border class

Defines the characters used to draw borders.

A border consists of:

  • Edge characters (top, bottom, left, right)
  • Corner characters (topLeft, topRight, bottomLeft, bottomRight)
  • Optional middle connectors for tables (middleLeft, middleRight, etc.)

Constructors

Border({required String top, required String bottom, required String left, required String right, required String topLeft, required String topRight, required String bottomLeft, required String bottomRight, String? middleLeft, String? middleRight, String? middleTop, String? middleBottom, String? middle})
Creates a border with the specified characters.
const

Properties

bottom String
Character for the bottom edge.
final
bottomLeft String
Character for the bottom-left corner.
final
bottomRight String
Character for the bottom-right corner.
final
hashCode int
The hash code for this object.
no setteroverride
hasMiddleConnectors bool
Whether this border has middle connectors defined.
no setter
isVisible bool
Whether this border has any visible characters.
no setter
left String
Character for the left edge.
final
middle String?
Character for middle cross connector (┼).
final
middleBottom String?
Character for middle-bottom connector (┴).
final
middleLeft String?
Character for middle-left connector (├).
final
middleRight String?
Character for middle-right connector (┤).
final
middleTop String?
Character for middle-top connector (┬).
final
Character for the right edge.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top String
Character for the top edge.
final
topLeft String
Character for the top-left corner.
final
topRight String
Character for the top-right corner.
final

Methods

buildBottom(int innerWidth) String
Builds the bottom border line for a given width.
buildSeparator(int innerWidth) String
Builds a horizontal separator line (for table rows).
buildTop(int innerWidth) String
Builds the top border line for a given width.
copyWith({String? top, String? bottom, String? left, String? right, String? topLeft, String? topRight, String? bottomLeft, String? bottomRight, String? middleLeft, String? middleRight, String? middleTop, String? middleBottom, String? middle}) Border
Creates a copy with the specified values replaced.
getBottomSize() int
Returns the width of the bottom border.
getLeftSize() int
Returns the width of the left border.
getRightSize() int
Returns the width of the right border.
getTopSize() int
Returns the width of the top border.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
wrapLine(String content) String
Wraps a single line of content with left and right borders.

Operators

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

Constants

ascii → const Border
ASCII border for maximum compatibility (+--+||+--+).
block → const Border
Block border using full block characters (█).
double → const Border
Double-line border (╔═╗║╚═╝).
hidden → const Border
Hidden border using spaces (preserves layout without visible border).
innerHalfBlock → const Border
Inner half-block border (▗▄▖▐▌▝▀▘).
markdown → const Border
Markdown-style border for tables.
none → const Border
No border (empty strings).
normal → const Border
Normal/single-line border (┌─┐│└─┘).
outerHalfBlock → const Border
Outer half-block border (▛▀▜▌▐▙▄▟).
rounded → const Border
Rounded border with curved corners (╭─╮│╰─╯).
thick → const Border
Thick/heavy border (┏━┓┃┗━┛).