MFontWeight enum
Styling types
Font weight, matching Flutter's FontWeight scale.
Android collapses some of these. textFontWeight is API 28 while the
minimum is 21, so weight is expressed through the sans-serif-* family
aliases the platform has always had — which offer thin, light, regular,
medium, bold and black. w200, w600 and w800 therefore render as their
nearest neighbour there. iOS honours all nine.
Values
- w100 → const MFontWeight
-
Thin.
const MFontWeight('thin', 'ultraLight') - w200 → const MFontWeight
-
Extra light — nearest Android family is thin.
const MFontWeight('thin', 'thin') - w300 → const MFontWeight
-
Light.
const MFontWeight('light', 'light') - w400 → const MFontWeight
-
Regular.
const MFontWeight('regular', 'regular') - w500 → const MFontWeight
-
Medium.
const MFontWeight('medium', 'medium') - w600 → const MFontWeight
-
Semibold — nearest Android family is medium.
const MFontWeight('medium', 'semibold') - w700 → const MFontWeight
-
Bold.
const MFontWeight('bold', 'bold') - w800 → const MFontWeight
-
Extra bold — nearest Android family is black.
const MFontWeight('black', 'heavy') - w900 → const MFontWeight
-
Black.
const MFontWeight('black', 'black')
Properties
- androidFamilySuffix → String
-
The
sans-serif-<suffix>family Android uses to approximate this weight.final - 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
- swiftWeight → String
-
The SwiftUI
Font.Weightcase name.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<
MFontWeight> - A constant List of the values in this enum, in order of their declaration.