PopScope<T> constructor

const PopScope<T>({
  1. Key? key,
  2. required Widget child,
  3. bool canPop = true,
  4. PopInvokedWithResultCallback<T>? onPopInvokedWithResult,
  5. @Deprecated('Use onPopInvokedWithResult instead. ' 'This feature was deprecated after v3.22.0-12.0.pre.') PopInvokedCallback? onPopInvoked,
})

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

Implementation

const PopScope({
  super.key,
  required this.child,
  this.canPop = true,
  this.onPopInvokedWithResult,
  @Deprecated(
    'Use onPopInvokedWithResult instead. '
    'This feature was deprecated after v3.22.0-12.0.pre.',
  )
  this.onPopInvoked,
}) : assert(onPopInvokedWithResult == null || onPopInvoked == null, 'onPopInvoked is deprecated, use onPopInvokedWithResult');