FontConfig class
Constructors
- FontConfig.asset({required String ltr, String? rtl})
-
Both LTR and RTL fonts loaded from local asset files.
factory
- FontConfig.google({required String ltr, String? rtl})
-
Both LTR and RTL fonts loaded from Google Fonts.
factory
- FontConfig.mixed({required String ltrGoogle, required String rtlAsset})
-
LTR from Google Fonts, RTL from a local asset font.
factory
- FontConfig.mixedReversed({required String ltrAsset, required String rtlGoogle})
-
RTL from Google Fonts, LTR from a local asset font.
factory
- FontConfig.system()
-
No custom font — uses the system/platform default font.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
directionAwareWrapper(
{required BuildContext context, required Widget child}) → Widget -
Returns a Widget that automatically switches font family based on the
current text direction. Wraps
childin a DefaultTextStyle override. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveFontFamily(
TextDirection direction) → String? -
Returns the resolved
fontFamilystring for the current text direction. -
resolveTextTheme(
TextDirection direction, TextTheme base) → TextTheme - Returns the appropriate TextTheme for the current text direction.
-
textStyleFor(
BuildContext context, {TextStyle base = const TextStyle()}) → TextStyle - Returns a TextStyle with the correct font applied for the current BuildContext's text direction.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited