operator [] method

InstalledCourse? operator [](
  1. String? id
)

Implementation

InstalledCourse? operator [](String? id) {
  for (final course in state.installed) {
    if (course.id == id) return course;
  }
  return null;
}