Flutter - How can I dynamically show or hide App Bars on pages

前端 未结 2 1505
野性不改
野性不改 2021-01-04 10:35

I have design one screen which is appear when intent from navigation drawer as well as from other screen.

Now i want to hide app bar when intent from navigation draw

相关标签:
2条回答
  • 2021-01-04 11:15

    You can make use of preferredSize widget like this:

    true ? Appbar() : PreferredSize(preferredSize: Size(0.0, 0.0),child: Container(),) This will hide the appbar if the condition is false.

    0 讨论(0)
  • 2021-01-04 11:20

    You can try this way

    appBar: boolTrue ? AppBar(...) : null
    
    0 讨论(0)
提交回复
热议问题