PopScope<T> constructor
- Key? key,
- required Widget child,
- bool canPop = true,
- PopInvokedWithResultCallback<
T> ? onPopInvokedWithResult, - @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');