ArticlePhoto.fromMap constructor

ArticlePhoto.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory ArticlePhoto.fromMap(Map<String, dynamic> map) {
  return ArticlePhoto(
    calibreId: map['calibreId']?.toInt() ?? 0,
    id: map['id']?.toInt() ?? 0,
    path: map['path'] ?? '',
    source: PhotoSource.tryParse(map['source'] ?? ''),
  );
}