Show/hide widgets in Flutter programmatically

前端 未结 13 1293
轮回少年
轮回少年 2020-11-28 04:13

In Android, every single View subclass has a setVisibility() method that allows you modify the visibility of a View object

The

13条回答
  •  迷失自我
    2020-11-28 04:39

    Try the Offstage widget

    if attribute offstage:true the not occupy the physical space and invisible,

    if attribute offstage:false it will occupy the physical space and visible

    Offstage(
       offstage: true,
       child: Text("Visible"),
    ),
    

提交回复
热议问题