Show/hide widgets in Flutter programmatically

前端 未结 13 1333
轮回少年
轮回少年 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:37

    One solution is to set tis widget color property to Colors.transparent. For instance:

    IconButton(
        icon: Image.asset("myImage.png",
            color: Colors.transparent,
        ),
        onPressed: () {},
    ),
    

提交回复
热议问题