Flutter layout without AppBar

前端 未结 2 1728
梦谈多话
梦谈多话 2021-02-05 18:36

I need a layout without an appbar, so the most obvious approach is to just leave out the appbar tag on the Scaffold but if I do that the content goes u

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 19:33

    Wrap your Column with SafeArea

      body: new SafeArea(
          child: new Column(
            crossAxisAlignment: CrossAxisAlignment.stretch,
            children: [
              new HeaderLayout(),
            ],
          )
      ) ,
    

    SafeArea is a widget that insets its child by sufficient padding to avoid intrusions by the operating system. For example, this will indent the child by enough to avoid the status bar at the top of the screen.

提交回复
热议问题