Data.fromJson constructor

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

Constructs a new Data object from a JSON representation.

  • json: A JSON map representing the Data object.

Implementation

Data.fromJson(Map<String, dynamic> json)
    : surahs = (json['surahs'] as List<dynamic>).map((dynamic e) => Surahs.fromJson(e as Map<String, dynamic>)).toList(),
      edition = Edition.fromJson(json['edition'] as Map<String, dynamic>);