changeOnErrorState method

void changeOnErrorState(
  1. bool state
)

Updates the error state to state and notifies listeners.

Implementation

void changeOnErrorState(final bool state) {
  // Set error flag
  onError = state;
  // Clear image data if error state is true
  if(state) _imageData = null;
  // Notify listeners of state change
  notifyListeners();
}