Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
quick fix
  • Loading branch information
bparrishMines committed Jan 30, 2023
commit 23b820dd16cc1c7be14a9614da3e9041ac2a2b01
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 3.2.3

* Fixes bug that prevented the web view from being garbage collected.
* Fixes bug causing a `LateInitializationError` when a `PlatformNavigationDelegate` is not provided.

## 3.2.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class AndroidWebViewController extends PlatformWebViewController {
if (weakReference.target?._currentNavigationDelegate?._onProgress !=
null) {
weakReference
.target!._currentNavigationDelegate?._onProgress!(progress);
.target!._currentNavigationDelegate!._onProgress!(progress);
}
};
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,19 @@ void main() {
expect(callbackProgress, 42);
});

test('onProgress does not cause LateInitializationError', () {
// ignore: unused_local_variable
final AndroidWebViewController controller = createControllerWithMocks(
createWebChromeClient: CapturingWebChromeClient.new,
);

// Should not cause LateInitializationError
CapturingWebChromeClient.lastCreatedDelegate.onProgressChanged!(
android_webview.WebView.detached(),
42,
);
});

test('setOnShowFileSelector', () async {
late final Future<List<String>> Function(
android_webview.WebView webView,
Expand Down