In Android, every single View
subclass has a setVisibility()
method that allows you modify the visibility of a View
object
The
You can encapsulate any widget in your code with a new widget called (Visibility), this is from the yellow lamp at the very left side of the widget that you want it to be in-visible
example: say you want to make a row invisible:
The Child of the newly created widget (Visibility Widget) is the Widget that you want it to be invisible
Visibility(
visible: false,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 10,
),
Text("Search",
style: TextStyle(fontSize: 20
),),
],
),
),
I hope it will help someone in the future