Ayahs.fromJson constructor

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

Constructs a new Ayahs object from a JSON representation.

  • json: A JSON map representing the Ayahs object.

Implementation

Ayahs.fromJson(Map<String, dynamic> json)
    : number = json['number'] as int,
      audio = json['audio'] as String,
      audioSecondary = (json['audioSecondary'] as List<dynamic>).map((dynamic e) => e as String).toList(),
      text = json['text'] as String,
      numberInSurah = json['numberInSurah'] as int,
      juz = json['juz'] as int,
      manzil = json['manzil'] as int,
      page = json['page'] as int,
      ruku = json['ruku'] as int,
      hizbQuarter = json['hizbQuarter'] as int,
      sajda = json['sajda'] == false ? false : true;