Text
VelocityX provides text with super powers.
important
When you are done with the text properties then use .make() to complete it as a widget.
note
Text, SelectableText and RichText works the same just replace text with selectableText or richText.
Below are some examples of differet text styles using the VelocityX text properties and widget.

You can use any string and convert it to a text widget.
You can use velocityx text with the Text widget itself.
You can use any string and convert it to a text widget.
You can use velocityx text with the Text widget itself.
Font Scale
VelocityX offers many predefined fontSizes as text properties
Prop (Type) | Desciption |
---|---|
xs | Extra Small (scaleFactor 0.75) |
sm | Small (scaleFactor 0.875) |
base | Normal (scaleFactor 1) |
lg | Large (scaleFactor 1.125) |
xl | Extra Large (scaleFactor 1.25) |
xl2 | 2 Extra Large (scaleFactor 1.5) |
xl3 | 3 Extra Large (scaleFactor 1.875) |
xl4 | 4 Extra Large (scaleFactor 2.25) |
xl5 | 5 Extra Large (scaleFactor 3) |
xl6 | 6 Extra Large (scaleFactor 4) |
Example
Set a custom font size
Font Weight
VelocityX offers many predefined font weights as text properties
Prop (Type) | Desciption |
---|---|
hairLine | Font Weight 100 |
thin | Font Weight 200 |
light | Font Weight 300 |
normal | Font Weight 400 |
medium | Font Weight 500 |
semiBold | Font Weight 600 |
bold | Font Weight 700 |
extraBold | Font Weight 800 |
extraBlack | Font Weight 900 |
Example
Set a custom font weight
Font Style
VelocityX offers predefined italic style as a text property
Text Alignment
VelocityX offers many predefined text alignments as text properties
Prop (Type) | Desciption |
---|---|
center | TextAlign.center |
start | TextAlign.start |
end | TextAlign.end |
justify | TextAlign.justify |
Example
Letter Spacing
VelocityX offers many predefined text spacing as text properties
Prop (Type) | Desciption |
---|---|
tightest | Letter Spacing -3.0 |
tighter | Letter Spacing -2.0 |
tight | Letter Spacing -1.0 |
wide | Letter Spacing 1.0 |
wider | Letter Spacing 2.0 |
widest | Letter Spacing 3.0 |
Example
Set a custom letter spacing
Text Decoration
VelocityX offers many predefined text decorations as text properties
Prop (Type) | Desciption |
---|---|
underline | TextDecoration.underline |
lineThrough | TextDecoration.lineThrough |
overline | TextDecoration.overline |
Example
Line Height
VelocityX offers many predefined line heights as text properties
Prop (Type) | Desciption |
---|---|
heightTight | Line Height 0.75 |
heightSnug | Line Height 0.875 |
heightRelaxed | Line Height 1.25 |
heightLoose | Line Height 1.5 |
Example
Set a custom line height
Text Utilities
VelocityX offers many predefined regular used utilities as text properties
Prop (Type) | Desciption |
---|---|
uppercase | WELCOME TO VELOCITYX |
lowercase | welcome to velocityx |
capitalize | Welcome To Velocityx |
hidePartial | * To Velocityx |
Example
Using All Together
Demo