Skip to content

Deprecated APIs ​

The 5.x Options classes, platform-prefixed callbacks, and IOS*/Android* type names remain in the public Dart API as compatibility shims. New code should use the current names in this table. Removing a shim is a major-version breaking change; MethodChannel names, payload keys, and native fallbacks stay in place until that decision is explicit.

shouldAllowDeprecatedTLS is not a deprecated API. The name refers to TLS 1.0 and 1.1 connections.

Options to Settings ​

DeprecatedCurrent
initialOptionsinitialSettings
InAppWebViewGroupOptions, InAppWebViewOptions, AndroidInAppWebViewOptions, IOSInAppWebViewOptionsInAppWebViewSettings
setOptions / getOptionssetSettings / getSettings
InAppBrowserClassOptions, InAppBrowserOptions, Android/iOS variantsInAppBrowserClassSettings / InAppBrowserSettings
ChromeCustomTabsOptions, SafariOptions, ChromeSafariBrowserClassOptionsChromeSafariBrowserSettings
PullToRefreshOptionsPullToRefreshSettings
ContextMenuOptionsContextMenuSettings
dart
InAppWebView(
  initialSettings: InAppWebViewSettings(
    javaScriptEnabled: true,
  ),
)

Common before/after snippets ​

Error callbacks ​

dart
// Before:
// onLoadError: (controller, url, code, message) { ... }

// After:
onReceivedError: (controller, request, error) {
  if (request.isForMainFrame != true) return;
  debugPrint('${error.type}: ${error.description}');
},

Download callbacks ​

dart
// Before:
// onDownloadStartRequest: (controller, request) async { ... }

// After:
onDownloadStarting: (controller, request) async {
  return null; // notify-only
  // or return DownloadStartResponse(...);
},

Find-in-page on the controller ​

dart
// Before:
// await controller.findAllAsync(find: 'term');

// After:
final find = FindInteractionController();
await find.findAll(find: 'term');
// iOS/macOS alternative:
await find.findString(find: 'term');

Cache clearing ​

dart
// Before:
// await controller.clearCache();

// After:
await InAppWebViewController.clearAllCache();

Widget and controller callbacks ​

DeprecatedCurrent
onLoadErroronReceivedError
onLoadHttpErroronReceivedHttpError
onDownloadStart, onDownloadStartRequestonDownloadStarting
onLoadResourceCustomSchemeonLoadResourceWithCustomScheme
widget onFindResultReceivedFindInteractionController.onFindResultReceived
onPrintonPrintRequest
onReceivedIcon (old signature)onFaviconChanged
androidOnSafeBrowsingHitonSafeBrowsingHit
androidOnPermissionRequestonPermissionRequest
androidOnGeolocationPermissionsShowPrompt / HidePromptunprefixed names
androidShouldInterceptRequestshouldInterceptRequest
androidOnRenderProcessGone / Responsive / Unresponsiveunprefixed names
androidOnFormResubmissiononFormResubmission
androidOnScaleChangedonZoomScaleChanged
androidOnReceivedIcon / TouchIconUrl / JsBeforeUnload / ReceivedLoginRequestunprefixed names
iosOnWebContentProcessDidTerminateonWebContentProcessDidTerminate
iosOnDidReceiveServerRedirectForProvisionalNavigationunprefixed name
iosOnNavigationResponseonNavigationResponse
iosShouldAllowDeprecatedTLSshouldAllowDeprecatedTLS
DeprecatedCurrent
clearCache()InAppWebViewController.clearAllCache
findAllAsync / findNext / clearMatches on controllerFindInteractionController.findAll / findNext / clearMatches
getScalegetZoomScale
setSafeBrowsingWhitelistsetSafeBrowsingAllowlist
iosWKPdfConfigurationpdfConfiguration
iosAllowingReadAccessToallowingReadAccessTo
androidHistoryUrlhistoryUrl
iosAnimatedanimated
CookieManager iosBelow11WebViewControllerwebViewController
Chrome Custom Tabs addDefaultShareMenuItemshareState
action button actiononClick
JavaScriptHandlerCallbackJavaScriptHandlerFunction
AndroidInAppWebViewController, IOSInAppWebViewControllerInAppWebViewController
AndroidWebStorageManager, IOSWebStorageManagerWebStorageManager
AndroidCookieManagerCookieManager
AndroidServiceWorkerController / AndroidServiceWorkerClientunprefixed classes
setOptions / getOptions on controllersetSettings / getSettings
tRexRunnerHtml / tRexRunnerCss on controllerstatic tRexRunnerHtml / tRexRunnerCss on InAppWebViewController

Platform-specific APIs that are not deprecated ​

Some similarly named methods target different engines. Use runtime checks instead of assuming one name works everywhere:

APIPlatformNotes
setAudioMuted / isAudioMutedAndroid, iOS, macOSAndroidX / WebKit media suspension
setMuted / isMutedLinux WPEWebKit mute for WPE WebView
navigateAndroid primaryFalls back to loadUrl when NavigationParameters is unavailable
saveStateWithOptionsAndroid primaryDelegates to saveState when options are unsupported

Settings fields that remain for compatibility ​

Deprecated settingCurrent guidance
clearCacheCall InAppWebViewController.clearAllCache
clearSessionCacheCall CookieManager.removeSessionCookies
forceDark / forceDarkStrategyUse algorithmicDarkeningAllowed. On Android 13+ the old force-dark APIs are no-ops.
saveFormDataNo Dart replacement. Android Autofill replaced WebView form-data saving; the setting is a no-op on API 26+ and is kept only for older Android versions.

IOS* and Android* type names (IOSSafariDismissButtonStyle, AndroidWebViewFeature, IOSWKNavigationType, and the same pattern for other enums) map 1:1 to the unprefixed type. Use the unprefixed name in new code.

Native SDK deprecations that stay on purpose ​

Android still declares minSdkVersion 24 (raised from 19 in 2.1.77). Legacy WebView, cookie, print, fullscreen, forceDark, and saveFormData call sites are isolated with file-level deprecation suppressions because there is no behavior-preserving replacement for that API range. Those native paths are not removed until an explicit minSdk increase. See the #2641 and #2685 record in docs/known-issues.md in the repository engineering docs.

allowUniversalAccessFromFileURLs=true remains on the Dart settings object for federated compatibility, but Android ignores true at the native boundary. Use WebViewAssetLoader or a controlled HTTPS origin for local resources.

Linux maps WKWebsiteDataTypeWebSQLDatabases to local storage because WPE does not provide WebSQL.

Analyzer notes ​

The plugin packages ignore deprecated_member_use so the shims can keep calling each other. Host applications that do not ignore those lints will see warnings until they migrate to the current names.

The engineering sequence, minSdk gate, and major-version removal rule are in the Deprecated API migration plan.

Built from the flutter_inappwebview_forge source tree.