GenericDocument.fromJson constructor
Implementation
factory GenericDocument.fromJson(Map<String, dynamic> json) {
rejectUnknownKeys('GenericDocument', json, const {
'id',
'country',
'pages',
'title',
'subtitle',
});
return GenericDocument(
id: json['id'] as String,
country: json['country'] as String,
pages: (json['pages'] as num).toInt(),
title: json['title'] as String,
subtitle: json['subtitle'] as String,
);
}