Surahs.fromJson constructor
Constructs a new Surahs
object from a JSON representation.
json
: A JSON map representing theSurahs
object.
Implementation
Surahs.fromJson(Map<String, dynamic> json)
: number = json['number'] as int,
name = json['name'] as String,
englishName = json['englishName'] as String,
englishNameTranslation = json['englishNameTranslation'] as String,
revelationType = json['revelationType'] as String,
ayahs = (json['ayahs'] as List<dynamic>).map((dynamic e) => Ayahs.fromJson(e)).toList();