validate method

bool validate()

Implementation

bool validate() {
  if (state.error == null) {
    if (state.isVisible) {
      emit(state.copyWith(isVisible: false));
    }
    return true;
  }

  if (!state.isVisible) {
    emit(state.copyWith(isVisible: true));
  }

  return false;
}