onPopCallback property

Future<void> Function(BuildContext context)? onPopCallback
final

Callback function executed when navigation should go back (e.g., closing dialogs or screens). This allows custom navigation handling, especially useful with custom routers like go_router.

Example with go_router:

onPopCallback: (context) async => context.pop()

Implementation

final Future<void> Function(BuildContext context)? onPopCallback;