GlyphSet class Null safety

A class that provides access to every configurable glyph.

This is provided as a class so that individual chunks of code can choose between ascii and unicode glyphs. For example:

import 'package:term_glyph/term_glyph.dart' as glyph;

/// Adds a vertical line to the left of [text].
///
/// If [unicode] is `true`, this uses Unicode for the line. If it's
/// `false`, this uses plain ASCII characters. If it's `null`, it
/// defaults to [glyph.ascii].
void addVerticalLine(String text, {bool unicode}) {
  var glyphs =
      (unicode ?? !glyph.ascii) ? glyph.unicodeGlyphs : glyph.asciiGlyphs;

  return text
      .split('\n')
      .map((line) => '${glyphs.verticalLine} $line')
      .join('\n');
}

Constructors

GlyphSet()

Properties

bottomLeftCorner String
The lower left-hand corner of a box.
read-only
bottomLeftCornerBold String
The bold lower left-hand corner of a box.
read-only
bottomLeftCornerDouble String
The double lower left-hand corner of a box.
read-only
bottomRightCorner String
The lower right-hand corner of a box.
read-only
bottomRightCornerBold String
The bold lower right-hand corner of a box.
read-only
bottomRightCornerDouble String
The double lower right-hand corner of a box.
read-only
bullet String
A bullet point.
read-only
cross String
An intersection of vertical and horizontal box lines.
read-only
crossBold String
An intersection of bold vertical and horizontal box lines.
read-only
crossDouble String
An intersection of double vertical and horizontal box lines.
read-only
downArrow String
A downwards-pointing arrow.
read-only
downEnd String
The bottom half of a vertical box line.
read-only
downEndBold String
The bottom half of a bold vertical box line.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
horizontalLine String
A horizontal line that can be used to draw a box.
read-only
horizontalLineBold String
A bold horizontal line that can be used to draw a box.
read-only
horizontalLineDouble String
A double horizontal line that can be used to draw a box.
read-only
horizontalLineDoubleDash String
A dashed horizontal line that can be used to draw a box.
read-only
horizontalLineDoubleDashBold String
A bold dashed horizontal line that can be used to draw a box.
read-only
horizontalLineQuadrupleDash String
A dashed horizontal line that can be used to draw a box.
read-only
horizontalLineQuadrupleDashBold String
A bold dashed horizontal line that can be used to draw a box.
read-only
horizontalLineTripleDash String
A dashed horizontal line that can be used to draw a box.
read-only
horizontalLineTripleDashBold String
A bold dashed horizontal line that can be used to draw a box.
read-only
leftArrow String
A left-pointing arrow.
read-only
leftEnd String
The left half of a horizontal box line.
read-only
leftEndBold String
The left half of a bold horizontal box line.
read-only
longLeftArrow String
A two-character left-pointing arrow.
read-only
longRightArrow String
A two-character right-pointing arrow.
read-only
rightArrow String
A right-pointing arrow.
read-only
rightEnd String
The right half of a horizontal box line.
read-only
rightEndBold String
The right half of a bold horizontal box line.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
teeDown String
A horizontal box line with a vertical line going down from the middle.
read-only
teeDownBold String
A bold horizontal box line with a vertical line going down from the middle.
read-only
teeDownDouble String
A double horizontal box line with a vertical line going down from the middle.
read-only
teeLeft String
A vertical box line with a horizontal line going left from the middle.
read-only
teeLeftBold String
A bold vertical box line with a horizontal line going left from the middle.
read-only
teeLeftDouble String
A double vertical box line with a horizontal line going left from the middle.
read-only
teeRight String
A vertical box line with a horizontal line going right from the middle.
read-only
teeRightBold String
A bold vertical box line with a horizontal line going right from the middle.
read-only
teeRightDouble String
A double vertical box line with a horizontal line going right from the middle.
read-only
teeUp String
A horizontal box line with a vertical line going up from the middle.
read-only
teeUpBold String
A bold horizontal box line with a vertical line going up from the middle.
read-only
teeUpDouble String
A double horizontal box line with a vertical line going up from the middle.
read-only
topLeftCorner String
The upper left-hand corner of a box.
read-only
topLeftCornerBold String
The bold upper left-hand corner of a box.
read-only
topLeftCornerDouble String
The double upper left-hand corner of a box.
read-only
topRightCorner String
The upper right-hand corner of a box.
read-only
topRightCornerBold String
The bold upper right-hand corner of a box.
read-only
topRightCornerDouble String
The double upper right-hand corner of a box.
read-only
upArrow String
An upwards-pointing arrow.
read-only
upEnd String
The top half of a vertical box line.
read-only
upEndBold String
The top half of a bold vertical box line.
read-only
verticalLine String
A vertical line that can be used to draw a box.
read-only
verticalLineBold String
A bold vertical line that can be used to draw a box.
read-only
verticalLineDouble String
A double vertical line that can be used to draw a box.
read-only
verticalLineDoubleDash String
A dashed vertical line that can be used to draw a box.
read-only
verticalLineDoubleDashBold String
A bold dashed vertical line that can be used to draw a box.
read-only
verticalLineQuadrupleDash String
A dashed vertical line that can be used to draw a box.
read-only
verticalLineQuadrupleDashBold String
A bold dashed vertical line that can be used to draw a box.
read-only
verticalLineTripleDash String
A dashed vertical line that can be used to draw a box.
read-only
verticalLineTripleDashBold String
A bold dashed vertical line that can be used to draw a box.
read-only

Methods

glyphOrAscii(String glyph, String alternative) String
Returns glyph if this supports Unicode glyphs and alternative otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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