toJson method Null safety
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (large != null) {
data['Large'] = large!.toJson();
}
if (mid != null) {
data['Mid'] = mid!.toJson();
}
if (marathon != null) {
data['Marathon'] = marathon!.toJson();
}
if (fast != null) {
data['Fast'] = fast!.toJson();
}
return data;
}