expressiveFontFamily function

String expressiveFontFamily(
  1. String family
)

family under the name Flutter registers it by: RobotoFlex when the app bundles it, packages/material_expressive_ui/RobotoFlex from the package. A test that loads the faces itself loads them under this name.

final loader = FontLoader(expressiveFontFamily('RobotoFlex'))..addFont(bytes);
await loader.load();

Implementation

String expressiveFontFamily(String family) => expressiveFontPackage == null
    ? family
    : 'packages/$expressiveFontPackage/$family';