FontConfig.asset constructor

FontConfig.asset({
  1. required String ltr,
  2. String? rtl,
})

Both LTR and RTL fonts loaded from local asset files.

The ltr and rtl values must match the family name declared in pubspec.yaml under flutter.fonts.

If rtl is omitted, the same ltr font is used for both directions.

Implementation

factory FontConfig.asset({
  required String ltr,
  String? rtl,
}) =>
    FontConfig._(
      ltr: _DirectionFont._(ltr, _FontSource.asset),
      rtl: _DirectionFont._(rtl ?? ltr, _FontSource.asset),
    );