getById static method

WorkoutExercise? getById(
  1. String id
)

Implementation

static WorkoutExercise? getById(String id) {
  try {
    return defaultExercises.firstWhere((e) => e.id == id);
  } catch (_) {
    return null;
  }
}