Code A works well, I think the _displayCheckBox.value should be non-null, you can see Image A which is from the prompt of Android Studio.
_displayCheckBox.value
I think I have