getFontCache method

Font? getFontCache(
  1. String fontFamily,
  2. String fontStyle,
  3. String fontWeight
)

Implementation

Font? getFontCache(String fontFamily, String fontStyle, String fontWeight) {
  final cache = '$fontFamily-$fontStyle-$fontWeight';

  if (!_fontCache.containsKey(cache)) {
    _fontCache[cache] = getFont(fontFamily, fontStyle, fontWeight);
  }

  return _fontCache[cache];
}