You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+78-1
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,8 @@ Classes:
40
40
-[InAppLocalhostServer](#inapplocalhostserver-class): This class allows you to create a simple server on `http://localhost:[port]/`. The default `port` value is `8080`.
41
41
-[CookieManager](#cookiemanager-class): Manages the cookies used by WebView instances. **NOTE for iOS**: available from iOS 11.0+.
42
42
43
+
See the online [docs](https://pub.dartlang.org/documentation/flutter_inappbrowser/latest/) to get the full documentation.
44
+
43
45
### `InAppWebView` class
44
46
Flutter Widget for adding an **inline native WebView** integrated in the flutter widget tree.
45
47
@@ -193,6 +195,9 @@ Initial url that will be loaded.
193
195
#### InAppWebView.initialFile
194
196
Initial asset file that will be loaded. See `InAppWebView.loadFile()` for explanation.
195
197
198
+
#### InAppWebView.initialData
199
+
Initial `InAppWebViewInitialData` that will be loaded.
200
+
196
201
#### InAppWebView.initialHeaders
197
202
Initial headers that will be used.
198
203
@@ -302,6 +307,49 @@ InAppWebView(
302
307
}
303
308
```
304
309
310
+
Event `onScrollChanged` fires when the `InAppWebView` scrolls.
311
+
`x` represents the current horizontal scroll origin in pixels.
312
+
`y` represents the current vertical scroll origin in pixels.
313
+
```dart
314
+
InAppWebView(
315
+
initialUrl: "https://flutter.io/",
316
+
onScrollChanged: (InAppWebViewController controller, int x, int y) {}
This is not always the same as the URL passed to `InAppWebView.onLoadStarted` because although the load for that URL has begun, the current page may not have changed.
Opens the giver`assetFilePath` file in a new `InAppBrowser` instance. The other arguments are the same of `InAppBrowser.open()`.
795
+
Opens the given`assetFilePath` file in a new `InAppBrowser` instance. The other arguments are the same of `InAppBrowser.open()`.
748
796
749
797
To be able to load your local files (assets, js, css, etc.), you need to add them in the `assets` section of the `pubspec.yaml` file, otherwise they cannot be found!
This is a static method that opens an `url` in the system browser. You wont be able to use the `InAppBrowser` methods here!
@@ -841,6 +899,14 @@ inAppBrowser.isOpened();
841
899
842
900
#### Events
843
901
902
+
Event `onBrowserCreated` fires when the `InAppBrowser` is created.
903
+
```dart
904
+
@override
905
+
void onBrowserCreated() {
906
+
907
+
}
908
+
```
909
+
844
910
Event `onLoadStart` fires when the `InAppBrowser` starts to load an `url`.
845
911
```dart
846
912
@override
@@ -911,6 +977,17 @@ Event `onLoadResource` fires when the `InAppBrowser` webview loads a resource.
911
977
}
912
978
```
913
979
980
+
Event `onScrollChanged` fires when the `InAppBrowser` webview scrolls.
981
+
`x` represents the current horizontal scroll origin in pixels.
982
+
`y` represents the current vertical scroll origin in pixels.
983
+
```dart
984
+
@override
985
+
void onScrollChanged(int x, int y) {
986
+
987
+
}
988
+
989
+
```
990
+
914
991
### `ChromeSafariBrowser` class
915
992
[Chrome Custom Tabs](https://developer.android.com/reference/android/support/customtabs/package-summary) on Android / [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS.
0 commit comments