Author.fromMap constructor

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

This is will help us to create object from Map

Implementation

factory Author.fromMap(Map<String, dynamic> map) {
  return Author(
    id: map['id'],
    displayName: map['displayName'],
    url: map['url'],
    image: map['image']['url'].toString().replaceFirst('//', ''),
  );
}