getFont static method

String getFont(
  1. FontKey key
)

Retrieve a font family by FontKey

Implementation

static String getFont(FontKey key) {
  final font = _fonts[key.key];
  if (font == null) {
    throw Exception('Font for key "${key.key}" is not registered!');
  }
  return font;
}