Skip to content

Commit

Permalink
v0.5.4, updated docs and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pichillilorenzo committed Oct 30, 2018
1 parent 305c726 commit 53e9ecb
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 58 deletions.
96 changes: 44 additions & 52 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ inAppWebViewController.goBack();

#### Future\<bool\> InAppWebViewController.canGoBack

Returns a Boolean value indicating whether the `InAppWebView` can move backward.
Returns a boolean value indicating whether the `InAppWebView` can move backward.

```dart
inAppWebViewController.canGoBack();
Expand All @@ -398,12 +398,36 @@ inAppWebViewController.goForward();

#### Future\<bool\> InAppWebViewController.canGoForward

Returns a Boolean value indicating whether the `InAppWebView` can move forward.
Returns a boolean value indicating whether the `InAppWebView` can move forward.

```dart
inAppWebViewController.canGoForward();
```

#### Future\<void\> InAppWebViewController.goBackOrForward

Goes to the history item that is the number of steps away from the current item. Steps is negative if backward and positive if forward.

```dart
inAppWebViewController.goBackOrForward(int steps);
```

#### Future\<bool\> InAppWebViewController.canGoBackOrForward

Returns a boolean value indicating whether the `InAppWebView` can go back or forward the given number of steps. Steps is negative if backward and positive if forward.

```dart
inAppWebViewController.canGoBackOrForward(int steps);
```

#### Future\<void\> InAppWebViewController.goTo

Navigates to a `WebHistoryItem` from the back-forward `WebHistory.list` and sets it as the current item.

```dart
inAppWebViewController.goTo(WebHistoryItem historyItem);
```

#### Future\<bool\> InAppWebViewController.isLoading

Check if the Web View of the `InAppWebView` instance is in a loading state.
Expand Down Expand Up @@ -498,6 +522,16 @@ Gets the current `InAppWebView` options. Returns `null` if the options are not s
inAppWebViewController.getOptions();
```

#### Future\<WebHistory\> InAppWebViewController.getCopyBackForwardList

Gets the WebHistory for this WebView. This contains the back/forward list for use in querying each item in the history stack.
This contains only a snapshot of the current state.
Multiple calls to this method may return different objects.
The object returned from this method will not be updated to reflect any new state.
```dart
inAppWebViewController.getCopyBackForwardList();
```

### `InAppBrowser` class
In-App Browser using native WebView.

Expand Down
8 changes: 4 additions & 4 deletions lib/flutter_inappbrowser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ class InAppWebViewController {
await _channel.invokeMethod('goBack', args);
}

///Returns a Boolean value indicating whether the [InAppWebView] can move backward.
///Returns a boolean value indicating whether the [InAppWebView] can move backward.
Future<bool> canGoBack() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null) {
Expand All @@ -893,7 +893,7 @@ class InAppWebViewController {
await _channel.invokeMethod('goForward', args);
}

///Returns a Boolean value indicating whether the [InAppWebView] can move forward.
///Returns a boolean value indicating whether the [InAppWebView] can move forward.
Future<bool> canGoForward() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null) {
Expand All @@ -916,7 +916,7 @@ class InAppWebViewController {
await _channel.invokeMethod('goBackOrForward', args);
}

///Gets whether the page can go back or forward the given number of steps.
///Returns a boolean value indicating whether the [InAppWebView] can go back or forward the given number of steps. Steps is negative if backward and positive if forward.
Future<bool> canGoBackOrForward(int steps) async {
assert(steps != null);

Expand All @@ -929,7 +929,7 @@ class InAppWebViewController {
return await _channel.invokeMethod('canGoBackOrForward', args);
}

///Navigates to an item from the back-forward list and sets it as the current item.
///Navigates to a [WebHistoryItem] from the back-forward [WebHistory.list] and sets it as the current item.
Future<void> goTo(WebHistoryItem historyItem) async {
await goBackOrForward(historyItem.offset);
}
Expand Down

0 comments on commit 53e9ecb

Please sign in to comment.