WillPopScopeModifier constructor

const WillPopScopeModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. 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 WillPopScopeModifier({
  super.key,
  super.child,
  super.modifierKey,
  required this.onWillPop,
});