loadFonts static method

Future<void> loadFonts(
  1. Map<String, List<String>> fontMap
)

Implementation

static Future<void> loadFonts(Map<String, List<String>> fontMap) async {
  final fonts = fontMap.entries
      .map((entry) =>
          _getFontLoader(family: entry.key, filePaths: entry.value))
      .toList();
  Future.wait(fonts.map((loader) => loader.load()));
}