首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么PopupMenuButton下拉菜单与statusBar重叠?

为什么PopupMenuButton下拉菜单与statusBar重叠?
EN

Stack Overflow用户
提问于 2018-07-08 01:54:11
回答 1查看 425关注 0票数 4

当我为PopupMenuButton设置initialValue时,下拉菜单与状态栏重叠。我怎样才能避免这种情况?另外,如何使PopupMenuButton的下拉位置位于appbar下方?

EN

回答 1

Stack Overflow用户

发布于 2020-05-07 22:16:42

您可以尝试添加以下内容:

代码语言:javascript
复制
  Widget getMessageText(double parentHeight, double parentWidth) {
    return Padding(
      padding:  EdgeInsets.only(right:parentWidth*0.06),
      child: Column(
        children: <Widget>[
          GestureDetector(
            onTap: (){
              Navigator.pop(context);

            },
            child: Padding(
              padding:  EdgeInsets.only(top: parentHeight*0.02,left: parentWidth*.03),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  new Text(
                    "All Posts",
                    style: CommonWidget.getHelveticaBoldTextStyle(
                        textFont, Colors.black.withOpacity(0.7)),
                    textScaleFactor: 1.1,
                  //  textAlign: TextAlign.center,
                  ),
                ],
              ),
            ),
          ),
          GestureDetector(
            onTap: (){
              Navigator.pop(context);


            },
            child: Padding(
              padding:  EdgeInsets.only(top: parentHeight*0.03,left: parentWidth*.03),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  Text(
                    "Posts",
                    style: CommonWidget.getHelveticaBoldTextStyle(
                        textFont, Colors.black.withOpacity(0.7)),
                    textScaleFactor: 1.1,
                    //  textAlign: TextAlign.center,
                  ),
                ],
              ),
            ),
          ),
          GestureDetector(
            onTap: (){

              Navigator.pop(context);

            },
            child: Padding(
              padding:  EdgeInsets.only(top: parentHeight*0.03,left: parentWidth*.03),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  Text(
                    "Complaints",
                    style: CommonWidget.getHelveticaBoldTextStyle(
                        textFont, Colors.black.withOpacity(0.7)),
                    textScaleFactor: 1.1,
                    //  textAlign: TextAlign.center,
                  ),
                ],
              ),
            ),
          )
        ],
      ),
    );



  }
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51225668

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档