Ayah.fromJson constructor

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

Creates an Ayah from JSON data

Implementation

factory Ayah.fromJson(Map<String, dynamic> json) {
  return Ayah(
    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,
  );
}