Fields display - show or hide using "depends"

I have a Dynamic list and a Value which are to be displayed as per the "flagValue" selection.

s:taboption("general", Flag, "flagValue", translate("Test Flag"))

suba = s:taboption("general", DynamicList, "list1", translate("LIST1 Flag 1"))
suba:depends("flagValue", "1")

subb= s:taboption("general", Value, "Value1", translate("Value Flag 0"))
subb:depends("flagValue", "0")

I have tried to get it working with the depends option , but in vain.
When flagValue is selected, Dynamic list is getting displayed which is expected, but when flagValue is uncheck , none of the options are displayed. Expectation is that the Dynamic list gets removed and Value field gets displayed as the dependency is put for "0".

Can we use the depends options for both "0" and "1"?

Are there any other alternatives to show and hide the options based on the Flag selection?

Try subb:depends("flagValue", "") (empty string) instead of subb:depends("flagValue", "0")