QuranMetadata.fromJson constructor

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

Creates QuranMetadata from JSON

Implementation

factory QuranMetadata.fromJson(Map<String, dynamic> json) {
  return QuranMetadata(
    totalSurahs: json['totalSurahs'] as int,
    totalAyat: json['totalAyat'] as int,
    meccanSurahs: json['meccanSurahs'] as int,
    medinanSurahs: json['medinanSurahs'] as int,
    dataVersion: json['dataVersion'] as String,
    lastUpdated: DateTime.parse(json['lastUpdated'] as String),
  );
}