Surahs.fromJson constructor

Surahs.fromJson(
  1. Map<String, dynamic> json
)

Constructs a new Surahs object from a JSON representation.

  • json: A JSON map representing the Surahs 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();