AyahWithSurah.fromJson constructor
Creates an AyahWithSurah from JSON data
Implementation
factory AyahWithSurah.fromJson(Map<String, dynamic> json) {
return AyahWithSurah(
id: json['id'] as int,
text: json['text'] as String,
sajdah: json['sajdah'] as bool? ?? false,
juz: json['juz'] as int,
hizb: json['hizb'] as int,
surah: Surah.fromJson(json['surah'] as Map<String, dynamic>),
source:
json['source'] as String? ?? "Tanzil Project - https://tanzil.net",
);
}