getFontsQuran method

Future<List> getFontsQuran()

Fetches a list of Quran fonts.

This method retrieves a list of available fonts for the Quran.

Returns a Future that completes with a List of dynamic objects representing the fonts.

Example usage:

List<dynamic> fonts = await getFontsQuran();

Implementation

Future<List<dynamic>> getFontsQuran() async {
  String jsonString = await rootBundle
      .loadString('packages/quran_library/assets/jsons/quranV2.json');
  Map<String, dynamic> jsonResponse = jsonDecode(jsonString);
  List<dynamic> surahsJson = jsonResponse['data']['surahs'];
  return surahsJson;
}