setGrade method

Grades setGrade(
  1. String system,
  2. String grade
)

Set grade for a specific system

Implementation

Grades setGrade(String system, String grade) {
  switch (system.toLowerCase()) {
    case 'vscale':
    case 'v_scale':
      return copyWith(vScale: grade);
    case 'yds':
      return copyWith(yds: grade);
    case 'french':
      return copyWith(french: grade);
    case 'font':
    case 'fontainebleau':
      return copyWith(font: grade);
    case 'uiaa':
      return copyWith(uiaa: grade);
    default:
      return this;
  }
}