toJson method Null safety
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['Easy'] = easy.toJson();
data['Medium'] = medium.toJson();
data['Extreme'] = extreme.toJson();
data['Hard'] = hard.toJson();
return data;
}