onBackPressed
This callback is invoked when the user presses the system back button (or performs the back gesture) while the flow is shown, and no on_device_back action is configured for the current screen or its navigator. A configured on_device_back takes precedence and is handled internally without invoking this callback.
The default implementation is a no-op that consumes the press (returns true), so by default the system back button does nothing — matching iOS, where a flow cannot be dismissed by a system gesture. Provide an explicit dismissal path (a close button or an on_device_back action), or return false here, if the user should be able to leave the flow with back.
Return
true if you handled the back press (it will be consumed); false to let the host's own back handling run (e.g. finishing the activity / popping the fragment).
Parameters
A UI Context within which the event occurred.