title: How can I set value of MutableLiveData<Boolean>() as adverse in Kotlin?
body: <p><code>_displayCheckBox</code> is a <code>MutableLiveData&lt;Boolean&gt;</code>, I hope to set it as adverse.</p>
  <p>But It seems that <code>_displayCheckBox.value =  !_displayCheckBox.value!!</code>  can't work well, how can I fix it?</p>
  <p><strong>Code A</strong></p>
  <pre><code>private val _displayCheckBox = MutableLiveData&lt;Boolean&gt;(true)
  val displayCheckBox : LiveData&lt;Boolean&gt; = _displayCheckBox
  
  fun switchCheckBox(){
      _displayCheckBox.value =  !_displayCheckBox.value!!   //It seems that it can't work well.
  }
  </code></pre>