toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['GeneralKnowledge'] = generalKnowledge.toJson();
  data['Art'] = art.toJson();
  data['Entertainment'] = entertainment.toJson();
  data['Science'] = science.toJson();
  data['Mythology'] = mythology.toJson();
  data['History'] = history.toJson();
  data['Sports'] = sports.toJson();
  return data;
}