fromMap static method

PageBlockRelatedArticle? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static PageBlockRelatedArticle? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var url = _map['url']! as String;
  var title = _map['title']! as String;
  var description = _map['description']! as String;
  var photo = Photo.fromMap(_map['photo']);
  var author = _map['author']! as String;
  var publish_date = _map['publish_date']! as int;
  return PageBlockRelatedArticle(
    extra: extra,
    clientId: clientId,
    url: url,
    title: title,
    description: description,
    photo: photo,
    author: author,
    publish_date: publish_date,
  );
}