iosWebViewFix/flutter_inappwebview_platfo.../README.md

23 lines
998 B
Markdown
Raw Normal View History

2023-11-27 17:32:38 +00:00
# flutter\_inappwebview\_platform\_interface
2023-11-17 22:28:11 +00:00
2023-11-27 17:48:38 +00:00
A common platform interface for the [`flutter_inappwebview`](https://pub.dev/packages/flutter_inappwebview) plugin.
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
This interface allows platform-specific implementations of the `flutter_inappwebview`
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
# Usage
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
To implement a new platform-specific implementation of `flutter_inappwebview`, extend
[`InAppWebViewPlatform`](lib/src/inappwebview_platform.dart) with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
`InAppWebViewPlatform` by calling
`InAppWebViewPlatform.instance = MyPlatformWebview()`.
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
# Note on breaking changes
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
Strongly prefer non-breaking changes (such as adding a method to the interface)
over breaking changes for this package.
2023-11-17 22:28:11 +00:00
2023-11-27 17:32:38 +00:00
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
on why a less-clean interface is preferable to a breaking change.