Collection.fromJson constructor
Collection.fromJson Mapping data to Collection
Implementation
factory Collection.fromJson(Map<String, dynamic> json) {
/// [Collection] Mapping object
return Collection(
id: json['id'] as String?,
title: json['title'] as String?,
description: json['description'] as String?,
private: json['private'] as bool?,
mediaCount: json['media_count'] as int?,
photosCount: json['photos_count'] as int?,
videosCount: json['videos_count'] as int?);
}