Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[webview_flutter_wkwebview] Update copy method for Dart classes and support the NSObject.observeValue for subclasses #5961

Merged
merged 36 commits into from
Jun 22, 2022
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e6618c8
standard creation
bparrishMines Jun 8, 2022
1bd8ca3
fix tests
bparrishMines Jun 8, 2022
6d67ecd
update mocks
bparrishMines Jun 8, 2022
8083132
ensure setup
bparrishMines Jun 8, 2022
abec006
current url
bparrishMines Jun 8, 2022
e5c820b
only set if nonnull
bparrishMines Jun 8, 2022
ed678fd
webview may have gotten it done
bparrishMines Jun 8, 2022
2edf7d7
some more objc polish
bparrishMines Jun 9, 2022
4ffc2de
formatting
bparrishMines Jun 9, 2022
8b7f28a
passing tests
bparrishMines Jun 9, 2022
613d5ac
prevent progress bug
bparrishMines Jun 9, 2022
6c059cf
pass error data back
bparrishMines Jun 9, 2022
1bfa38e
return errors instead
bparrishMines Jun 9, 2022
6aaf2c2
fix returning non bool
bparrishMines Jun 9, 2022
1ab7ceb
return expected string bool and double values
bparrishMines Jun 9, 2022
3c7090a
use objective c string as returning result
bparrishMines Jun 9, 2022
4ff2fc0
dart side of addiing dispose and create webview configuration
bparrishMines Jun 10, 2022
bd635a7
webviewconfiguration objc code
bparrishMines Jun 10, 2022
0cdcde3
formatting
bparrishMines Jun 10, 2022
6f9dbc1
store binary messenger
bparrishMines Jun 10, 2022
8bc168e
fix configuration identifier
bparrishMines Jun 10, 2022
5ebbb62
Merge branch 'main' of github.com:flutter/plugins into copies
bparrishMines Jun 10, 2022
191bd31
Merge branch 'main' of github.com:flutter/plugins into copies
bparrishMines Jun 13, 2022
c8585c0
new fix for nserror
bparrishMines Jun 14, 2022
37d8300
fix crash
bparrishMines Jun 14, 2022
e7b9d11
correct import
bparrishMines Jun 14, 2022
5537463
Merge branch 'main' of github.com:flutter/plugins into copies
bparrishMines Jun 15, 2022
b2892e2
formatting and test passing
bparrishMines Jun 15, 2022
f40115d
nonatomic
bparrishMines Jun 15, 2022
2a18e2c
duplicate code + missing comma
bparrishMines Jun 15, 2022
3011abe
missing commas
bparrishMines Jun 15, 2022
f3f58e3
another missing comma
bparrishMines Jun 21, 2022
353cab1
improve weak comments
bparrishMines Jun 22, 2022
d92b699
formatting
bparrishMines Jun 22, 2022
4710dc9
Merge branch 'main' of github.com:flutter/plugins into copies
bparrishMines Jun 22, 2022
7d7a273
Merge branch 'main' of github.com:flutter/plugins into copies
bparrishMines Jun 22, 2022
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
prevent progress bug
  • Loading branch information
bparrishMines committed Jun 9, 2022
commit 613d5ac945ba50a59c626b762afadcdccfcd9896
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class WebKitWebViewPlatformController extends WebViewPlatformController {

bool _zoomEnabled = true;
bool _hasNavigationDelegate = false;
bool _hasProgressTracking = false;

final Map<String, WKScriptMessageHandler> _scriptMessageHandlers =
<String, WKScriptMessageHandler>{};
Expand Down Expand Up @@ -457,17 +458,22 @@ class WebKitWebViewPlatformController extends WebViewPlatformController {
await _resetUserScripts(removedJavaScriptChannels: javascriptChannelNames);
}

Future<void> _setHasProgressTracking(bool hasProgressTracking) {
Future<void> _setHasProgressTracking(bool hasProgressTracking) async {
// Calls to removeObserver before addObserver causes a crash.
if (_hasProgressTracking == hasProgressTracking) {
return;
}
_hasProgressTracking = hasProgressTracking;
if (hasProgressTracking) {
return webView.addObserver(
await webView.addObserver(
webView,
keyPath: 'estimatedProgress',
options: <NSKeyValueObservingOptions>{
NSKeyValueObservingOptions.newValue,
},
);
} else {
return webView.removeObserver(webView, keyPath: 'estimatedProgress');
await webView.removeObserver(webView, keyPath: 'estimatedProgress');
}
}

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy