FontLoader class

A class that enables the dynamic loading of fonts at runtime.

The FontLoader class provides a builder pattern, where the caller builds up the assets that make up a font family, then calls load to load the entire font family into a running Flutter application.


FontLoader(String family)
Creates a new FontLoader that will load font assets for the specified family.


family String
The font family being loaded.
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


addFont(Future<ByteData> bytes) → void
Registers a font asset to be loaded by this font loader.
load() Future<void>
Loads this font loader's font family and all of its associated assets into the Flutter engine, making the font available to the current application.
loadFont(Uint8List list, String family) Future<void>
Hook called to load a font asset into the engine.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.