getSurahArtPath method

Widget getSurahArtPath({
  1. required int index,
  2. Color? color,
  3. double? fontSize,
  4. bool? withSurahWord = false,
})

getSurahArtPath يعيد ويدجيت المخطوطة الخاصة بإسم السور.

getSurahArtPath returns widget for Quran surah name artistic manuscript path

Implementation

Widget getSurahArtPath(
    {required int index,
    Color? color,
    double? fontSize,
    bool? withSurahWord = false}) {
  if (_cache.containsKey('allSurahsArtPath')) {
    return _cache['allSurahsArtPath'] as Widget;
  }
  final paths = Text(
    withSurahWord!
        ? 'surah${(index + 1).toString().padLeft(3, '0')}surah-icon'
        : 'surah${(index + 1).toString().padLeft(3, '0')}',
    style: TextStyle(
      color: color ?? Colors.black,
      fontFamily: "surah-name-v4",
      fontSize: fontSize ?? 38,
      package: "quran_library",
    ),
  );
  _cache['allSurahsArtPath'] = paths;
  return paths;
}