xOnPopWrapper method

Widget xOnPopWrapper(
  1. bool canPop, {
  2. required void onPop(
    1. bool didPop,
    2. dynamic data
    )?,
})

Implementation

Widget xOnPopWrapper(bool canPop,
    {required void Function(bool didPop, dynamic data)? onPop}) {
  return PopScope(
    canPop: canPop,
    onPopInvokedWithResult: (didPop, t) {
      onPop?.call(didPop, t);
    },
    child: this,
  );
}