faces method

Future<List<DVSystemFontFace>> faces({
  1. String? family,
})

Every installed face, or those of family (matched without regard to case), in the order the platform lists them. Empty where families would be, for the same reason.

Implementation

Future<List<DVSystemFontFace>> faces({String? family}) async {
  final List<DVSystemFontFace> all = (await _list()).faces;
  if (family == null) return all;
  final String key = family.toLowerCase();
  return <DVSystemFontFace>[
    for (final DVSystemFontFace face in all)
      if (face.family.toLowerCase() == key) face,
  ];
}