toggleIsReadOnly method

void toggleIsReadOnly()

Changes isReadOnly to the opposite value of its current one and calls notifyListeners

Implementation

void toggleIsReadOnly(){
  isReadOnly = !isReadOnly;
  notifyListeners();
}