WillPopScope constructor

const WillPopScope({Key key, @required Widget child, @required WillPopCallback onWillPop })

Creates a widget that registers a callback to veto attempts by the user to dismiss the enclosing ModalRoute.

The child argument must not be null.

Implementation

const WillPopScope({
  Key key,
  @required this.child,
  @required this.onWillPop,
}) : assert(child != null),
     super(key: key);