diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index cd5f0a39..e5de8703 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -15,7 +15,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -32,63 +46,11 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -104,11 +66,6 @@
- getPre
- client
- webView
- result.s
- result
Client
LOAD_START_EVENT
loadstop
@@ -134,6 +91,11 @@
_blank
.html
close(
+ isOpened
+ javascript
+ header
+ localhost
+ /main.dart
activity.getPreferences(0)
@@ -171,21 +133,22 @@
-
-
+
+
-
+
+
-
-
-
+
+
+
@@ -194,18 +157,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -213,28 +164,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -245,7 +179,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -402,33 +348,34 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -437,7 +384,6 @@
-
@@ -482,45 +428,10 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -606,13 +517,6 @@
-
-
-
-
-
-
-
@@ -622,16 +526,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -669,13 +563,6 @@
-
-
-
-
-
-
-
@@ -709,71 +596,134 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52acf4d3..4a29b0c8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 0.4.1
+
+- added `InAppBrowser.takeScreenshot()`
+- added `InAppBrowser.setOptions()`
+- added `InAppBrowser.getOptions()`
+
## 0.4.0
- removed `target` parameter to `InAppBrowser.open()` method. To open the url on the system browser, use the `openWithSystemBrowser: true` option
@@ -7,6 +13,7 @@
- added `InAppBrowser.openWithSystemBrowser` method
- added `InAppBrowser.openOnLocalhost` method
- added `InAppBrowser.loadFile` method
+- added `InAppBrowser.isOpened` method
## 0.3.2
diff --git a/README.md b/README.md
index bc39e50a..37a218cb 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,14 @@
A Flutter plugin that allows you to open an in-app browser window.
This plugin is inspired by the popular [cordova-plugin-inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser)!
+### IMPORTANT Note for iOS
+To be able to use this plugin on iOS, you need to create the Flutter App with `flutter create -i swift` (see [flutter/flutter#13422 (comment)](https://github.com/flutter/flutter/issues/13422#issuecomment-392133780)), otherwise, you will get this message:
+```
+=== BUILD TARGET flutter_inappbrowser OF PROJECT Pods WITH CONFIGURATION Debug ===
+The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.
+```
+that is not true! The Swift version that I have used is already a supported value: 4.0.
+
## Getting Started
For help getting started with Flutter, view our online
@@ -334,7 +342,7 @@ inAppBrowser.loadUrl(String url, {Map headers = const {}});
Loads the given `assetFilePath` with optional `headers` specified as a map from name to value.
-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!
+To be able to load your local files (html, js, css, etc.), you need to add them in the `assets` section of the `pubspec.yaml` file, otherwise they cannot be found!
Example of a `pubspec.yaml` file:
```yaml
@@ -493,6 +501,35 @@ Returns `true` if the callback is removed, otherwise `false`.
inAppBrowser.removeJavaScriptHandler(String handlerName, int index);
```
+#### Future\ InAppBrowser.takeScreenshot
+
+Takes a screenshot (in PNG format) of the view's visible viewport and returns a `Uint8List`. Returns `null` if it wasn't be able to take it.
+
+**NOTE for iOS**: available from iOS 11.0+.
+```dart
+inAppBrowser.takeScreenshot();
+```
+
+#### Future\ InAppBrowser.setOptions
+
+Sets the InAppBrowser options with the new `options` and evaluates them.
+```dart
+inAppBrowser.setOptions(Map options);
+```
+
+#### Future\