Favorites.fromJson constructor

Favorites.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Favorites.fromJson(Map<String, dynamic> json) {
  if (json['activities'] != null) {
    activities = json['activities'].cast<String>();
  }
  if (json['books'] != null) {
    books = json['books'].cast<String>();
  }
  if (json['interests'] != null) {
    interests = json['interests'].cast<String>();
  }
  if (json['movies'] != null) {
    movies = json['movies'].cast<String>();
  }
  if (json['television'] != null) {
    television = json['television'].cast<String>();
  }
}