fromJson static method

Visitor fromJson(
  1. dynamic json
)

Implementation

static Visitor fromJson(dynamic json) {
  if (json == null) return Visitor.defaultVisitor();

  return Visitor(
    uid: json['uid'],
    nickname: json['nickname'],
    avatar: json['avatar'],
    type: json['type'],
    extra: json['extra'],
  );
}