In Android, every single View
subclass has a setVisibility()
method that allows you modify the visibility of a View
object
There are 3 options of setting the visibility:
- Visible: Renders the
View
visible inside the layout - Invisible: Hides the
View
, but leaves a gap that is equivalent to what theView
would occupy if it were visible - Gone: Hides the
View
, and removes it entirely from the layout. It’s as if itsheight
andwidth
were0dp
Is there something equivalent to the above for Widgets in Flutter?
For a quick reference:
https://developer.android.com/reference/android/view/View.html#attr_android:visibility