FontFamily class final
A font family a site declares (a pubspec fonts: entry): text styles
name it by family ("fontFamily": "Fraunces", whatever the files call
themselves inside), and each weight and style draws from its file.
JSON, in site.json: "fonts": [{"family": "Fraunces", "fonts": [{"asset": "fonts/Fraunces-Regular.ttf"}, {"asset": "fonts/Fraunces-Bold.ttf", "weight": 700}, {"asset": "fonts/Fraunces-Italic.ttf", "style": "italic"}]}].
- Annotations
-
- @immutable
Constructors
-
FontFamily({required String family, List<
FontAsset> fonts = const []}) -
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Object? json) → FontFamily? -
Null for anything without a
family. -
listFromJson(
Object? json) → List< FontFamily>