toJson method Null safety

Map toJson()

Implementation

Map toJson() {
  return {
    'user': user?.toJson(),
    'groupNickname': groupNickname,
    'memberType': getStringFromEnum(memberType),
    'joinGroupTime': joinGroupTime
  };
}