toJson method Null safety
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['durationInformation'] = durationInformation.toJson();
data['difficultyInformation'] = difficultyInformation.toJson();
data['minutesPlayed'] = minutesPlayed;
data['questionsAnswered'] = questionsAnswered;
data['elo'] = elo;
data['questionsRightAnswered'] = questionsRightAnswered;
data['categoryInformation'] = categoryInformation.toJson();
data['username'] = username;
return data;
}