saveInvisibleCourseCodes method

void saveInvisibleCourseCodes({
  1. required Course course,
  2. required bool visibility,
})

Implementation

void saveInvisibleCourseCodes({
  required Course course,
  required bool visibility,
}) {
  if (visibility) {
    invisibleCourseCodes.remove(course.code);
  } else {
    invisibleCourseCodes.add(course.code);
  }
  Preferences.setStringList(
    '$_kCourseInvisibleKey${widget.courseNotifySaveKey}',
    invisibleCourseCodes,
  );
  setState(() {});
}