FontWeight enum

The thickness of the glyphs used to draw text.

Terminal-Only Font Weights: Unlike Flutter which supports 9 numeric weights (w100-w900), terminals can only render 3 distinct text weights. This enum only exposes what OpenTUI can actually render.

Flutter compatibility note: w100-w900 removed because terminal emulators lack font weight granularity. They typically support only normal/bold/dim.

Inheritance
Available extensions

Values

normal → const FontWeight

Normal text weight - no special attributes applied. Maps to: No OpenTUI attributes (0)

bold → const FontWeight

Bold text weight - heavier than normal. Maps to: OpenTUI Attr.bold (1 << 0)

dim → const FontWeight

Dimmed text weight - lighter than normal, terminal-specific feature. Maps to: OpenTUI Attr.dim (1 << 1) Note: This is a terminal enhancement not available in Flutter

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

values → const List<FontWeight>
A constant List of the values in this enum, in order of their declaration.