FTypography class final
Definitions for the various typographical styles that are part of a FThemeData.
A FTypography contains scalar values for scaling a TextStyle's corresponding properties. It also contains labelled font sizes, such as FTypography.xs, which are based on Tailwind CSS.
The scaling is applied automatically in all Forui widgets while the labelled font sizes are used as the defaults
for the corresponding properties of widget styles configured via inherit(...)
constructors.
- Mixed-in types
Constructors
- FTypography({String defaultFontFamily = 'packages/forui/Inter', TextStyle xs = const TextStyle(fontSize: 12, height: 1), TextStyle sm = const TextStyle(fontSize: 14, height: 1.25), TextStyle base = const TextStyle(fontSize: 16, height: 1.5), TextStyle lg = const TextStyle(fontSize: 18, height: 1.75), TextStyle xl = const TextStyle(fontSize: 20, height: 1.75), TextStyle xl2 = const TextStyle(fontSize: 22, height: 2), TextStyle xl3 = const TextStyle(fontSize: 30, height: 2.25), TextStyle xl4 = const TextStyle(fontSize: 36, height: 2.5), TextStyle xl5 = const TextStyle(fontSize: 48, height: 1), TextStyle xl6 = const TextStyle(fontSize: 60, height: 1), TextStyle xl7 = const TextStyle(fontSize: 72, height: 1), TextStyle xl8 = const TextStyle(fontSize: 96, height: 1)})
-
Creates a FTypography.
const
- FTypography.inherit({required FColorScheme colorScheme, String defaultFontFamily = 'packages/forui/Inter'})
-
Creates a FTypography that inherits its properties from
colorScheme
.
Properties
- base → TextStyle
-
The font size for base text.
final
- defaultFontFamily → String
-
The default font family. Defaults to
packages/forui/Inter
.final - hashCode → int
-
The hash code for this object.
no setteroverride
- lg → TextStyle
-
The font size for large text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sm → TextStyle
-
The font size for small text.
final
- xl → TextStyle
-
The font size for extra large text.
final
- xl2 → TextStyle
-
The font size for extra large text.
final
- xl3 → TextStyle
-
The font size for extra large text.
final
- xl4 → TextStyle
-
The font size for extra large text.
final
- xl5 → TextStyle
-
The font size for extra large text.
final
- xl6 → TextStyle
-
The font size for extra large text.
final
- xl7 → TextStyle
-
The font size for extra large text.
final
- xl8 → TextStyle
-
The font size for extra large text.
final
- xs → TextStyle
-
The font size for extra small text.
final
Methods
-
copyWith(
{String? defaultFontFamily, TextStyle? xs, TextStyle? sm, TextStyle? base, TextStyle? lg, TextStyle? xl, TextStyle? xl2, TextStyle? xl3, TextStyle? xl4, TextStyle? xl5, TextStyle? xl6, TextStyle? xl7, TextStyle? xl8}) → FTypography - Returns a copy of this FTypography with the given properties replaced.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
{double sizeScalar = 1}) → FTypography - Scales the fields of this FTypography by the given fields.
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override