workoutSourceNullableFromJson function
WorkoutSource?
workoutSourceNullableFromJson(
- Object? workoutSource, [
- WorkoutSource? defaultValue
Implementation
enums.WorkoutSource? workoutSourceNullableFromJson(
Object? workoutSource, [
enums.WorkoutSource? defaultValue,
]) {
if (workoutSource == null) {
return null;
}
return enums.WorkoutSource.values
.firstWhereOrNull((e) => e.value == workoutSource) ??
defaultValue;
}