updated README.md
This commit is contained in:
parent
26e63cedee
commit
c65e72c708
|
@ -201,7 +201,7 @@ First, add `flutter_inappwebview` as a [dependency in your pubspec.yaml file](ht
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Classes:
|
Classes:
|
||||||
- [InAppWebView](#inappwebview-class): Flutter Widget for adding an **inline native WebView** integrated into the flutter widget tree. To use `InAppWebView` class on iOS you need to opt-in for the embedded views preview by adding a boolean property to the app's `Info.plist` file, with the key `io.flutter.embedded_views_preview` and the value `YES`. Also, note that on Android it requires **Android API 20+** (see [AndroidView](https://api.flutter.dev/flutter/widgets/AndroidView-class.html)) or **Android API 19+** if you enable the `useHybridComposition` Android-specific option.
|
- [InAppWebView](#inappwebview-class): Flutter Widget for adding an **inline native WebView** integrated into the flutter widget tree. Note that on Android it requires **Android API 20+** (see [AndroidView](https://api.flutter.dev/flutter/widgets/AndroidView-class.html)) or **Android API 19+** if you enable the `useHybridComposition` Android-specific option.
|
||||||
- [ContextMenu](#contextmenu-class): This class represents the WebView context menu.
|
- [ContextMenu](#contextmenu-class): This class represents the WebView context menu.
|
||||||
- [HeadlessInAppWebView](#headlessinappwebview-class): Class that represents a WebView in headless mode. It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
- [HeadlessInAppWebView](#headlessinappwebview-class): Class that represents a WebView in headless mode. It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
||||||
- [InAppBrowser](#inappbrowser-class): In-App Browser using native WebView.
|
- [InAppBrowser](#inappbrowser-class): In-App Browser using native WebView.
|
||||||
|
@ -251,9 +251,7 @@ The plugin relies on Flutter's mechanism (in developers preview) for embedding A
|
||||||
Known issues are tagged with the [platform-views](https://github.com/flutter/flutter/labels/a%3A%20platform-views) label in the [Flutter official repo](https://github.com/flutter/flutter).
|
Known issues are tagged with the [platform-views](https://github.com/flutter/flutter/labels/a%3A%20platform-views) label in the [Flutter official repo](https://github.com/flutter/flutter).
|
||||||
Keyboard support within webviews is also experimental.
|
Keyboard support within webviews is also experimental.
|
||||||
|
|
||||||
To use `InAppWebView` class on iOS you need to opt-in for the embedded views preview by adding a boolean property to the app's `Info.plist` file, with the key `io.flutter.embedded_views_preview` and the value `YES`.
|
Note that on Android it requires **Android API 20+** (see [AndroidView](https://api.flutter.dev/flutter/widgets/AndroidView-class.html))
|
||||||
|
|
||||||
Also, note that on Android it requires **Android API 20+** (see [AndroidView](https://api.flutter.dev/flutter/widgets/AndroidView-class.html))
|
|
||||||
or **Android API 19+** if you enable the `useHybridComposition` Android-specific option.
|
or **Android API 19+** if you enable the `useHybridComposition` Android-specific option.
|
||||||
|
|
||||||
Use `InAppWebViewController` to control the WebView instance.
|
Use `InAppWebViewController` to control the WebView instance.
|
||||||
|
|
|
@ -76,8 +76,6 @@ void main() {
|
||||||
expect(currentUrl, 'https://www.google.com/');
|
expect(currentUrl, 'https://www.google.com/');
|
||||||
});
|
});
|
||||||
|
|
||||||
// enable this once https://github.com/flutter/flutter/issues/31510
|
|
||||||
// is resolved.
|
|
||||||
testWidgets('loadUrl with headers', (WidgetTester tester) async {
|
testWidgets('loadUrl with headers', (WidgetTester tester) async {
|
||||||
final Completer controllerCompleter =
|
final Completer controllerCompleter =
|
||||||
Completer<InAppWebViewController>();
|
Completer<InAppWebViewController>();
|
||||||
|
@ -585,7 +583,7 @@ void main() {
|
||||||
|
|
||||||
isPaused = await controller.evaluateJavascript(source: 'isPaused();');
|
isPaused = await controller.evaluateJavascript(source: 'isPaused();');
|
||||||
expect(isPaused, true);
|
expect(isPaused, true);
|
||||||
}/*, skip: true https://github.com/flutter/flutter/issues/72572 */);
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('getTitle', (WidgetTester tester) async {
|
testWidgets('getTitle', (WidgetTester tester) async {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import 'in_app_webview_controller.dart';
|
||||||
import 'webview_options.dart';
|
import 'webview_options.dart';
|
||||||
import 'headless_in_app_webview.dart';
|
import 'headless_in_app_webview.dart';
|
||||||
|
|
||||||
///Abstract class that represents a WebView. Used by [WebView] and [HeadlessInAppWebView].
|
///Abstract class that represents a WebView. Used by [InAppWebView] and [HeadlessInAppWebView].
|
||||||
abstract class WebView {
|
abstract class WebView {
|
||||||
///The window id of a [CreateWindowRequest.windowId].
|
///The window id of a [CreateWindowRequest.windowId].
|
||||||
final int? windowId;
|
final int? windowId;
|
||||||
|
|
Loading…
Reference in New Issue