setOption method

bool setOption(
  1. PrefsOption option

Add an option or replace an option if one already exists with the same name. If option exists in lockedPrefs it will not be added. Returns true if userPrefs was updated, false otherwise.


bool setOption(PrefsOption option) {
  if (lockedPrefs.contains(option)) {
    print('Option "${}" (${option.value}) is locked and therefore '
    return false;
  return true;