How to hide drawer in flutter after changing Scaffold.body value
问题 I am using the method in this question to change the body of a Scaffold in flutter: Flutter Drawer Widget - change Scaffold.body content The method described works perfectly. Now I would like just the drawer to automatically close after the users taps on one of the items. I tried using the Navigator.pop() method, but it pops the entire screen, not just the drawer. It leaves me with a totally black screen. Any suggestions? 回答1: Are you using exactly Navigator.of(context).pop() ? I cannot