When I set initialValue for PopupMenuButton, the dropdown overlaps statusbar. How can I avoid this? Also, How to make PopupMenuButton's dropdown position below appbar?
            Asked
            
        
        
            Active
            
        
            Viewed 568 times
        
    4
            
            
        - 
                    Have you tried wrapping your Scaffold's body in a SafeArea widget? – Javid Noutash Jul 09 '18 at 06:51
 - 
                    Nope that doesn't change anything. – Figen Güngör Jul 09 '18 at 18:38
 - 
                    Any update on this? I have same problem – Your Friend Ken Oct 04 '19 at 15:34
 - 
                    Adding a PopupMenuButton as an action of the AppBar, I find the location of the popup menu to be non-standard. I would like to see it appear BELOW the AppBar – AlanKley Jan 10 '21 at 16:44
 
1 Answers
-1
            
            
        You can try adidng this:
  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,
                  ),
                ],
              ),
            ),
          )
        ],
      ),
    );
  }
        Dharmaraj
        
- 47,845
 - 8
 - 52
 - 84
 
        Neeraj Sharma
        
- 21
 - 4
 
