Alert.fromJson constructor

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

Implementation

Alert.fromJson(Map<String, dynamic> json) {
  posted = json['posted'];

  fromUser = json['from_user'] != null ? new User.fromJson(json['from_user']) : null;
  toUser = json['to_user'] != null ? new User.fromJson(json['to_user']) : null;
  newFan = json['new_fan'] != null ? new User.fromJson(json['new_fan']) : null;
  friendInfo = json['friend_info'] != null ? new User.fromJson(json['friend_info']) : null;
  newFriend = json['new_friend'] != null ? new User.fromJson(json['new_friend']) : null;
  owner = json['owner'] != null ? new User.fromJson(json['owner']) : null;

  //Possible null.
  plurkId = json['plurk_id'];
  //Possible null.
  numOthers = json['num_others'];
  //Possible null.
  responseId = json['response_id'];

  type = json['type'];
}