FontWeight class

The thickness of the glyphs used to draw the text.

Fonts are typically weighted on a 9-point scale, which, for historical reasons, uses the names 100 to 900. In Flutter, these are named w100 to w900 and have the following conventional meanings:

For example, the font named "Roboto Medium" is typically exposed as a font with the name "Roboto" and the weight FontWeight.w500.

Some modern fonts allow the weight to be adjusted in arbitrary increments. See FontVariation.weight for details.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
The encoded integer value of this font weight.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
The thickness value of this font weight.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

lerp(FontWeight? a, FontWeight? b, double t) FontWeight?
Linearly interpolates between two font weights.

Constants

bold → const FontWeight
A commonly used font weight that is heavier than normal.
normal → const FontWeight
The default font weight.
values → const List<FontWeight>
A list of all the font weights.
w100 → const FontWeight
Thin, the least thick.
w200 → const FontWeight
Extra-light.
w300 → const FontWeight
Light.
w400 → const FontWeight
Normal / regular / plain.
w500 → const FontWeight
Medium.
w600 → const FontWeight
Semi-bold.
w700 → const FontWeight
Bold.
w800 → const FontWeight
Extra-bold.
w900 → const FontWeight
Black, the most thick.