WillPopScope is a widget class in Flutter that registers to attempt to veto by the user to dismiss the enclosing ModalRoute. Hence, it's a helpful widget for controlling how a Flutter app responds to screen-exit attempts, commonly with the back button press event.