FontLoader class
Loads QFC4 fonts into the Flutter engine and manages page readiness.
For each page, registers 4 font variants:
page{N}— light mode with tajweed colorspage{N}d— dark mode with tajweed colorspage{N}n— light mode, no tajweed (all black)page{N}nd— dark mode, no tajweed (all white)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadedCount → int
-
Number of pages loaded so far.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ensurePagesLoaded(
int centerPage, {int radius = 5}) → Future< void> -
Ensures fonts for pages in range
centerPage ± radiusare loaded. -
getFontFamilyForPage(
int pageNumber, {required bool isDark, required bool tajweed}) → String - Returns the font family for a page based on theme settings.
-
isPageReady(
int pageNumber) → bool - Whether a page's font is ready for rendering.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Reset state (for testing or cache clear).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → FontLoader
-
final
Static Methods
-
darkFontFamily(
int pageNumber) → String - Font family name for a page (dark tajweed).
-
fontFamily(
int pageNumber) → String - Font family name for a page (light tajweed).
-
noTajweedDarkFontFamily(
int pageNumber) → String - Font family name for a page (dark no tajweed).
-
noTajweedFontFamily(
int pageNumber) → String - Font family name for a page (light no tajweed).