MinecraftNews.fromJson constructor

MinecraftNews.fromJson(
  1. Map<String, dynamic> data
)

Implementation

MinecraftNews.fromJson(Map<String, dynamic> data)
    : title = data['title'],
      tag = data.containsKey('tag') ? data['tag'] : '',
      category = data['category'],
      _date = data['date'],
      text = data['text'],
      url = data['readMoreLink'],
      id = data['id'],
      _imageUrl = data['newsPageImage']['url'],
      important = data.containsKey('cardBorder') ? data['cardBorder'] : false;