FTypeface class final

Typographical tokens across different sizes, which are based on Tailwind CSS.

A FTypeface is itself a FScalableExtension, so it can be registered directly on a FTypography (e.g. a monospace code typeface) and retrieved via typography.extension<FTypeface>().

Inheritance
Mixed-in types

Constructors

FTypeface({String fontFamily = FTypeface.defaultFontFamily, List<String>? fontFamilyFallback, TextStyle? xs3, TextStyle? xs2, TextStyle? xs, TextStyle? sm, TextStyle? md, TextStyle? lg, TextStyle? xl, TextStyle? xl2, TextStyle? xl3, TextStyle? xl4, TextStyle? xl5, TextStyle? xl6, TextStyle? xl7, TextStyle? xl8, Iterable<FScalableExtension> extensions = const []})
Creates a FTypeface that defaults to touch font sizes.
FTypeface.inherit({required FColors colors, required bool touch, String fontFamily = FTypeface.defaultFontFamily, List<String>? fontFamilyFallback})
Creates a FTypeface that inherits its properties.
factory

Properties

extensions Set<ThemeExtension>
All FScalableExtensions defined in this typeface.
no setter
fontFamily String
The font family. Defaults to defaultFontFamily.
final
fontFamilyFallback List<String>
The font families to use as fallbacks when a glyph is not found in fontFamily. Defaults to an empty list.
final
hashCode int
The hash code for this object.
no setteroverride
lg TextStyle
The font size for large text.
final
md TextStyle
The font size for medium text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sm TextStyle
The font size for small text.
final
type Object
The extension's type.
no setterinherited
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
xs2 TextStyle
The font size for extra extra small text.
final
xs3 TextStyle
The font size for extra extra extra small text.
final

Methods

copyWith({TextStyle? xs3, TextStyle? xs2, TextStyle? xs, TextStyle? sm, TextStyle? md, TextStyle? lg, TextStyle? xl, TextStyle? xl2, TextStyle? xl3, TextStyle? xl4, TextStyle? xl5, TextStyle? xl6, TextStyle? xl7, TextStyle? xl8, Iterable<FScalableExtension>? extensions}) FTypeface
Returns a copy of this FTypeface with the given properties replaced.
override
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
extension<T extends Object>() → T
Obtains a particular FScalableExtension.
lerp(covariant FTypeface? other, double t) FTypeface
Linearly interpolates between this FTypeface and other using the given factor t.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scale({double sizeScalar = 1}) FTypeface
Scales this FTypeface by sizeScalar.
override
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

Constants

defaultFontFamily → const String
The default font family. Defaults to packages/forui/Inter.