onProxyIncompatibleDocument property
Callback fired when a proxy-fetched page is detected as incompatible
with data: URL origin (e.g. Cloudflare anti-bot challenge pages).
Use this to trigger a fallback action such as opening the URL in a new browser tab. When this callback is provided it is called instead of onIframeBlocked for this specific case.
Example:
SWebView(
url: 'https://flightradar24.com',
onProxyIncompatibleDocument: () {
SWebView.openInNewTab('https://flightradar24.com',
addToProxyCacheForNextTime: false);
},
)
Implementation
final VoidCallback? onProxyIncompatibleDocument;