fetchFontZip function

Future<Uint8List> fetchFontZip(
  1. String fontId, [
  2. String? version
])

Fetch zip bundle of a font.

Implementation

Future<Uint8List> fetchFontZip(String fontId, [String? version]) async {
  final response = await http.get(Uri.parse(
      '$apiUrl/v1/fonts/$fontId/download${version == null ? '' : '?version=$version'}'));

  return response.bodyBytes;
}