NyxTextFormat class
The NyxTextFormat class holds the formatting options for text to be printed. This class allows customization of text appearance, including font size, style, alignment, spacing, and padding. It provides a method toMap to convert the properties into a map format suitable for platform-specific communication.
Constructors
- NyxTextFormat({int textSize = 24, bool underline = false, double textScaleX = 1.0, double textScaleY = 1.0, double letterSpacing = 0, double lineSpacing = 0, int topPadding = 0, int leftPadding = 0, NyxAlign align = NyxAlign.left, NyxFontStyle style = NyxFontStyle.normal, NyxFont font = NyxFont.defaultFont})
- Constructor to initialize the NyxTextFormat with default values or custom ones.
Properties
- align ↔ NyxAlign
-
The alignment of the text.
getter/setter pair
- font ↔ NyxFont
-
The font type to be used for the text.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- leftPadding ↔ int
-
The left padding for the text.
getter/setter pair
- letterSpacing ↔ double
-
The space between letters.
getter/setter pair
- lineSpacing ↔ double
-
The space between lines of text.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ NyxFontStyle
-
The style of the font.
getter/setter pair
- textScaleX ↔ double
-
Horizontal scaling factor for text.
getter/setter pair
- textScaleY ↔ double
-
Vertical scaling factor for text.
getter/setter pair
- textSize ↔ int
-
The size of the text to be printed.
getter/setter pair
- topPadding ↔ int
-
The top padding for the text.
getter/setter pair
- underline ↔ bool
-
Whether the text should be underlined.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts the NyxTextFormat properties into a map of key-value pairs.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited