-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is there an existing feature request for this?
- I have searched the existing feature request
Operating System
iOS, macOS
Pain
Currently, the flutter_inappwebview package does not provide any way to control or configure the iOS Writing Tools (such as predictive text, autocorrection, or Apple Intelligence features related to text input). This limitation affects apps that require a customized typing experience or need to disable certain intelligent writing aids for specific use cases—such as legal forms, code editors, or privacy-sensitive input fields.
Without access to these settings, developers lose fine-grained control over the user experience on iOS, leading to inconsistencies across platforms and potentially frustrating interactions for end users. Having the ability to manage these tools directly from Flutter would greatly improve flexibility and professionalism in apps that rely on precise text input.
Suggested solution
To make Writing Tools behavior configurable in flutter_inappwebview, I suggest adding a new setting to the InAppWebViewSettings class that maps to the native writingToolsBehavior property introduced in iOS 18.
This would allow developers to control the behavior from Dart, for example:
dart
InAppWebView(
initialSettings: InAppWebViewSettings(
writingToolsBehavior: 'none', // or 'default'
),
)
On the iOS side, this setting could be applied in the preWKWebViewConfiguration method like this:
swift
if #available(iOS 18.0, *) {
if let behavior = settings?.writingToolsBehavior {
switch behavior {
case "none":
configuration.writingToolsBehavior = .none
case "default":
configuration.writingToolsBehavior = .default
default:
break
}
}
}
This approach keeps the API consistent with other platform-specific settings and gives developers full control over the iOS Writing Tools experience directly from Flutter.
Useful resources
Apple Developer Documentation for writingToolsBehavior Describes the WKWebViewConfiguration.writingToolsBehavior property introduced in iOS 18, including available options and usage.
iOS 18 Release Notes (if available) May contain additional context or examples related to Writing Tools and Apple Intelligence features.
Swift example usage:
swift
if #available(iOS 18.0, *) {
configuration.writingToolsBehavior = .none
}
These resources should help guide the implementation and ensure compatibility with iOS platform standards.
Additional information
This feature request is based on the new writingToolsBehavior property introduced in iOS 18, which allows developers to control Writing Tools behavior in WKWebViewConfiguration. I’ve tested the following native implementation successfully:
swift
if #available(iOS 18.0, *) {
configuration.writingToolsBehavior = .none
}
This disables predictive text, autocorrection, and other Apple Intelligence writing features in the WebView. A Flutter-side setting would make this behavior configurable and consistent across platforms.
If needed, I can provide a sample project or screen recording demonstrating the current limitation and how the native workaround behaves.
Self grab
- I'm ready to work on this issue!