visible property Null safety

bool visible
final

Switches between showing the sliver or hiding it.

The maintain flags should be set to the same values regardless of the state of the visible property, otherwise they will not operate correctly (specifically, the state will be lost regardless of the state of maintainState whenever any of the maintain flags are changed, since doing so will result in a subtree shape change).

Unless maintainState is set, the sliver subtree will be disposed (removed from the tree) while hidden.

Implementation

final bool visible;