Sender.fromJson constructor Null safety

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

Implementation

factory Sender.fromJson(Map<String, dynamic> json) {
  if (json['guest_id'] != null) json['user_id'] = json['guest_id'];
  if (json['name'] != null) json['nickname'] = json['name'];
  if (json['image'] != null) json['profile_url'] = json['image'];
  return _$SenderFromJson(json);
}