toJson method
Converts the workout alert to a JSON object
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': type.toString().split('.').last,
'threshold': threshold,
'unitSpeed': unitSpeed.toString().split('.').last,
'metric': metric.toString().split('.').last,
};
}