FontWeight enum

The font-weight CSS property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.

Read more: MDN font-weight

Inheritance
Available extensions

Values

normal → const FontWeight

Normal font weight. Same as 400.

const FontWeight('normal')
bold → const FontWeight

Bold font weight. Same as 700.

const FontWeight('bold')
bolder → const FontWeight

One relative font weight heavier than the parent element.

Note that only four font weights are considered for relative weight calculation.

const FontWeight('bolder')
lighter → const FontWeight

One relative font weight lighter than the parent element.

Note that only four font weights are considered for relative weight calculation.

const FontWeight('lighter')
w100 → const FontWeight
const FontWeight('100')
w200 → const FontWeight
const FontWeight('200')
w300 → const FontWeight
const FontWeight('300')
w400 → const FontWeight
const FontWeight('400')
w500 → const FontWeight
const FontWeight('500')
w600 → const FontWeight
const FontWeight('600')
w700 → const FontWeight
const FontWeight('700')
w800 → const FontWeight
const FontWeight('800')
w900 → const FontWeight
const FontWeight('900')
inherit → const FontWeight
const FontWeight('inherit')
initial → const FontWeight
const FontWeight('initial')
revert → const FontWeight
const FontWeight('revert')
revertLayer → const FontWeight
const FontWeight('revert-layer')
unset → const FontWeight
const FontWeight('unset')

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
value String
final

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.