SMKitWorkoutModificationEvent.fromJson constructor
SMKitWorkoutModificationEvent.fromJson(
- Map<String, dynamic> json
)
Implementation
factory SMKitWorkoutModificationEvent.fromJson(Map<String, dynamic> json) {
return SMKitWorkoutModificationEvent(
type: json['type'],
timestamp: json['timestamp'],
sourceDetector: json['sourceDetector'] ?? json['source_detector'],
appliedDetector: json['appliedDetector'] ?? json['applied_detector'],
pairedDetector: json['pairedDetector'] ?? json['paired_detector'],
restSeconds: _intOrNull(json['restSeconds'] ?? json['rest_seconds']),
source: json['source'],
);
}