Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
7e1ba2c
issue #1983: Fixed to prevent Activity from being restored
acn-shuhei-suzuki Jan 18, 2024
69c629e
redirect bug fix
lyb5834 Feb 1, 2024
6f705b0
Update InAppWebViewClientCompat.java
lyb5834 Feb 23, 2024
e4d043d
request focus
yamaha252 Jan 18, 2024
4f59192
Android: implemented PlatformPrintJobController.onComplete
Doflatango Jul 8, 2024
36eb8cb
[web] support iframe role attribute
p-mazhnik May 16, 2024
abb5eec
[web] support iframe aria-hidden attribute
p-mazhnik May 28, 2024
6a0c192
change priority of DispatchQueue
nnnlog Oct 3, 2024
952aa78
windows: Updated code to support multiple flutter windows
pichillilorenzo Oct 8, 2024
f67ae1f
updated flutter_inappwebview_windows version to ^0.6.0
pichillilorenzo Oct 8, 2024
22e492d
platform_interface: Updated static fromMap implementation for some cl…
pichillilorenzo Oct 23, 2024
dc7bc50
android: Added InAppWebViewController.enableSlowWholeDocumentDraw sta…
pichillilorenzo Oct 23, 2024
ccfaa36
Merge pull request #2322 from nnnlog/master
pichillilorenzo Oct 23, 2024
b1ada7e
update README.md
allcontributors[bot] Oct 23, 2024
10d6b4f
update .all-contributorsrc
allcontributors[bot] Oct 23, 2024
c654f96
Merge pull request #2367 from pichillilorenzo/all-contributors/add-nn…
pichillilorenzo Oct 23, 2024
b96fe38
updated CHANGELOG files
pichillilorenzo Oct 23, 2024
4ba6e22
fix #2025
pichillilorenzo Oct 25, 2024
2f2a86e
update README.md
allcontributors[bot] Oct 25, 2024
83ee929
update .all-contributorsrc
allcontributors[bot] Oct 25, 2024
e0b65c7
Merge pull request #2371 from pichillilorenzo/all-contributors/add-Mu…
pichillilorenzo Oct 25, 2024
564495e
Merge pull request #2293 from p-mazhnik/web-iframe-role
pichillilorenzo Oct 25, 2024
ecebeef
update README.md
allcontributors[bot] Oct 25, 2024
56f79d6
update .all-contributorsrc
allcontributors[bot] Oct 25, 2024
143ebd1
Merge pull request #2372 from pichillilorenzo/all-contributors/add-bs…
pichillilorenzo Oct 25, 2024
b2b1ddd
Added PlatformInAppLocalhostServer.onData parameter to set a custom o…
pichillilorenzo Oct 25, 2024
53f627f
Merge pull request #1984 from ShuheiSuzuki-07/bugfix/issue-1983
pichillilorenzo Oct 25, 2024
bd80276
update README.md
allcontributors[bot] Oct 25, 2024
b0938ca
update .all-contributorsrc
allcontributors[bot] Oct 25, 2024
64c5072
update README.md
allcontributors[bot] Oct 25, 2024
4342a01
update .all-contributorsrc
allcontributors[bot] Oct 25, 2024
8813830
Update .all-contributorsrc
pichillilorenzo Oct 25, 2024
261e6a6
Update README.md
pichillilorenzo Oct 25, 2024
60d2562
Merge pull request #2374 from pichillilorenzo/all-contributors/add-Sh…
pichillilorenzo Oct 25, 2024
fa1ee68
androi: Fixed crash when trying to open InAppBrowser with R.menu.menu…
pichillilorenzo Oct 25, 2024
33af65b
Added javaScriptHandlerOriginAllowList, pluginScriptsOriginAllowList,…
pichillilorenzo Oct 26, 2024
05713fa
ios: implemented new changes of flutter_inappwebview_platform_interfa…
pichillilorenzo Oct 27, 2024
07005bc
macos: implemented new changes of flutter_inappwebview_platform_inter…
pichillilorenzo Oct 28, 2024
592a09c
windows: implemented features of flutter_inappwebview_platform_interf…
pichillilorenzo Oct 29, 2024
f82f04c
updated android get javascript bridge method name
pichillilorenzo Oct 29, 2024
1cf6090
Merge branch 'v6.2.0' of github.com:pichillilorenzo/flutter_inappwebv…
pichillilorenzo Oct 29, 2024
3da1de1
code format
pichillilorenzo Oct 29, 2024
e739b1f
android, ios, macos: implemented javaScriptBridgeEnabled, javaScriptB…
pichillilorenzo Oct 29, 2024
6616c4a
windows: implemented javaScriptBridgeEnabled, javaScriptBridgeOriginA…
pichillilorenzo Oct 29, 2024
21e259d
updated android USER_SCRIPTS_AT_DOCUMENT_ WRAPPER_JS_SOURCE
pichillilorenzo Oct 29, 2024
d26d30c
Merge branch 'v6.2.0' of github.com:pichillilorenzo/flutter_inappwebv…
pichillilorenzo Oct 29, 2024
3362798
Fixed specific URLAuthenticationChallenge type for onReceivedHttpAuth…
pichillilorenzo Oct 30, 2024
ebb7ecb
updated android ios and macos javascript bridge js script, macos and …
pichillilorenzo Oct 31, 2024
2ca0a09
windows: updated javascript bridge logic, Implemented onReceivedHttpA…
pichillilorenzo Oct 31, 2024
bde1880
windows: updated user_content_controller
pichillilorenzo Oct 31, 2024
921f1a3
update Android Cookie Expiration date format to 24-hour format (HH)
takuyaaaaaaahaaaaaa Oct 31, 2024
f3bf4b8
windows: fix #2391, implemented onReceivedClientCertRequest WebView e…
pichillilorenzo Nov 2, 2024
217cfe5
windows: Implemented onReceivedServerTrustAuthRequest WebView event, …
pichillilorenzo Nov 2, 2024
159a801
windows: implemented onRenderProcessGone, onRenderProcessUnresponsive…
pichillilorenzo Nov 3, 2024
df18df4
Deprecated InAppWebViewSettings.forceDark and InAppWebViewSettings.fo…
pichillilorenzo Nov 4, 2024
9947449
updated plugin version to 6.2.0-beta.1
pichillilorenzo Nov 4, 2024
4104ccf
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 4, 2024
0db3491
Merge pull request #2389 from takuyaaaaaaahaaaaaa/master
pichillilorenzo Nov 4, 2024
f8b94d8
update README.md
allcontributors[bot] Nov 4, 2024
593ebc6
update .all-contributorsrc
allcontributors[bot] Nov 4, 2024
83c2390
Merge pull request #2395 from pichillilorenzo/all-contributors/add-ta…
pichillilorenzo Nov 4, 2024
f0fcd6e
ios, macos: updated _getCookieExpirationDate method format in case of…
pichillilorenzo Nov 4, 2024
c5f0a11
Merge branch 'master' into v6.2.0-beta.1
pichillilorenzo Nov 4, 2024
ec91feb
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 4, 2024
91da208
updated readme
pichillilorenzo Nov 4, 2024
9e55a04
Merge pull request #2168 from yamaha252/focus
pichillilorenzo Nov 4, 2024
c4b4c23
update README.md
allcontributors[bot] Nov 4, 2024
d43e339
update .all-contributorsrc
allcontributors[bot] Nov 4, 2024
0e12d75
Merge pull request #2396 from pichillilorenzo/all-contributors/add-ya…
pichillilorenzo Nov 4, 2024
bd5960d
updated readme
pichillilorenzo Nov 4, 2024
a273635
updated requestFocus implementation, macos: implemented requestFocus …
pichillilorenzo Nov 4, 2024
beaac15
Merge branch 'master' into v6.2.0-beta.1
pichillilorenzo Nov 4, 2024
f16fe06
updated tests, android: fixed js bridge logic, ios: Fixed show, hide …
pichillilorenzo Nov 5, 2024
1c90aef
code format
pichillilorenzo Nov 5, 2024
a02f678
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 5, 2024
9a03fec
Update in_app_webview_settings.dart
pichillilorenzo Nov 5, 2024
3638298
Update in_app_webview_settings.g.dart
pichillilorenzo Nov 5, 2024
bf68646
Merge branch 'master' into master
pichillilorenzo Nov 5, 2024
3906248
Merge pull request #2008 from lyb5834/master
pichillilorenzo Nov 5, 2024
a89bf94
update README.md
allcontributors[bot] Nov 5, 2024
124da7d
update .all-contributorsrc
allcontributors[bot] Nov 5, 2024
a21de80
Merge pull request #2399 from pichillilorenzo/all-contributors/add-ly…
pichillilorenzo Nov 5, 2024
f8ca0ff
android: Added regexToAllowSyncUrlLoading Android-specific property t…
pichillilorenzo Nov 5, 2024
d54b44e
Merge branch 'master' of github.com:pichillilorenzo/flutter_inappwebview
pichillilorenzo Nov 5, 2024
36d9ff0
updated readme
pichillilorenzo Nov 5, 2024
c9b629d
Merge branch 'master' into v6.2.0-beta.1
pichillilorenzo Nov 5, 2024
c23a014
updated changelog
pichillilorenzo Nov 5, 2024
fe51dda
web: Fixed 'Type 'int' is not a subtype of type 'JSValue' in type cas…
pichillilorenzo Nov 5, 2024
c7de95b
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 5, 2024
e92723a
ios and macos: forced 'var registrar: FlutterPluginRegistrar' to not …
pichillilorenzo Nov 5, 2024
f9353d6
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 5, 2024
c96b7c8
released version 6.2.0-beta.1
pichillilorenzo Nov 5, 2024
75fd86c
Merge branch 'v6.2.0-beta.1'
pichillilorenzo Nov 5, 2024
a903d97
updated user_script.dart code docs
pichillilorenzo Nov 5, 2024
4f550f0
fixed wrong label doc for WebView.enableSlowWholeDocumentDraw link
pichillilorenzo Nov 5, 2024
54ba230
Fixed specific URLAuthenticationChallenge type for onReceivedHttpAuth…
pichillilorenzo Nov 7, 2024
b54fa56
Add interface for enabling and disabling input methods on iOS and And…
ryan-feline Nov 8, 2024
2429d0c
Add android implementation for disable and enable input method.
ryan-feline Nov 8, 2024
da9d4a7
Add iOS implementation for enable / disable input method.
ryan-feline Nov 8, 2024
5999154
Fix Android imports.
ryan-feline Nov 8, 2024
c8b0a9c
Add show / hide keyboard to in app web view demo.
ryan-feline Nov 8, 2024
2dd6cb8
Add show and hide to android interface.
ryan-feline Nov 8, 2024
fc75a0a
Wrap show and hide into enable and disable call.
ryan-feline Nov 8, 2024
a2a4871
Tweak icons.
ryan-feline Nov 8, 2024
3e919ed
Split hide and show.
ryan-feline Nov 8, 2024
210bede
Add show and hide to example.
ryan-feline Nov 8, 2024
9b82cf8
Only show input option for iOS and Android.
ryan-feline Nov 8, 2024
263e33a
Iterate through all subviews to force reload of keyboard.
ryan-feline Nov 8, 2024
c74cbec
windows: fix #2402, fix #2404, Implemented disableDefaultErrorPage, s…
pichillilorenzo Nov 8, 2024
ab2631b
windows: implemented allowsBackForwardNavigationGestures, hiddenPdfTo…
pichillilorenzo Nov 8, 2024
edb670b
windows: Fixed wrong channel name when creating a WebViewEnvironment …
pichillilorenzo Nov 9, 2024
abf9572
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 9, 2024
b9af92d
Merge branch 'disable_enable_input' of https://github.com/Mecharyry/f…
pichillilorenzo Nov 11, 2024
428e089
updated implementation of setInputMethodEnabled, hideInputMethod, sho…
pichillilorenzo Nov 11, 2024
cff1404
Merge branch 'Mecharyry-disable_enable_input'
pichillilorenzo Nov 11, 2024
6e0b1e2
update README.md
allcontributors[bot] Nov 11, 2024
0ad22f3
update .all-contributorsrc
allcontributors[bot] Nov 11, 2024
9e73300
Merge pull request #2411 from pichillilorenzo/all-contributors/add-Me…
pichillilorenzo Nov 11, 2024
7b56c86
Merge branch 'master' into v6.2.0-beta.2
pichillilorenzo Nov 11, 2024
c38c6ce
fix #2314
pichillilorenzo Nov 12, 2024
9e2e465
updated changelog
pichillilorenzo Nov 12, 2024
70db43e
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 12, 2024
fe5949f
updated readme
pichillilorenzo Nov 12, 2024
cc618f5
Merge branch 'master' into v6.2.0-beta.2
pichillilorenzo Nov 12, 2024
398ab55
updated exchangeable_object_generator and exchangeable_object_propert…
pichillilorenzo Nov 12, 2024
bcda70c
fix #2413
pichillilorenzo Nov 12, 2024
e0ffc3e
fix #1947
pichillilorenzo Nov 12, 2024
dd7d2df
updated changelog
pichillilorenzo Nov 12, 2024
6c5ed7b
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 12, 2024
afe154d
fix #1694
pichillilorenzo Nov 12, 2024
0f06f3d
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 12, 2024
e74cde0
updated fix for #1947 when resizeToAvoidBottomInset is false
pichillilorenzo Nov 12, 2024
ed3297e
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 12, 2024
654ddbb
fix #540
pichillilorenzo Nov 13, 2024
0987b01
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 13, 2024
8071187
updated .github workflows stale.yaml
pichillilorenzo Nov 13, 2024
b176b62
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 13, 2024
3a931e8
platform_interface: Updated all WebView events with return type Futur…
pichillilorenzo Nov 13, 2024
7c7fb51
merge
pichillilorenzo Nov 13, 2024
4910813
updated download_start_response
pichillilorenzo Nov 13, 2024
d32475e
Added exclusiveUserDataFolderAccess, isCustomCrashReportingEnabled, e…
pichillilorenzo Nov 14, 2024
cb336d8
Added onNewBrowserVersionAvailable and onBrowserProcessExited events …
pichillilorenzo Nov 18, 2024
0fc1598
added getProcessInfos and getFailureReportFolderPath WebViewEnvironme…
pichillilorenzo Nov 18, 2024
ac5ba26
added onAcceleratorKeyPressed WebView event and handleAcceleratorKeyP…
pichillilorenzo Nov 26, 2024
f40da9f
updated the download event using onDownloadStarting name for all the …
pichillilorenzo Nov 26, 2024
b1e11f8
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 26, 2024
0e967b6
fix #1973
pichillilorenzo Nov 26, 2024
4d3ffe5
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 26, 2024
4c7e86f
update README.md
allcontributors[bot] Nov 26, 2024
b941102
update .all-contributorsrc
allcontributors[bot] Nov 26, 2024
a8cfe64
Merge pull request #2432 from pichillilorenzo/all-contributors/add-fu…
pichillilorenzo Nov 26, 2024
1d09dd6
updated readme
pichillilorenzo Nov 26, 2024
96ec7d7
Merge branch 'master' into v6.2.0-beta.2
pichillilorenzo Nov 26, 2024
c82ece1
updated flutter_inappwebview_internal_annotations changelog
pichillilorenzo Nov 26, 2024
f5a42f2
code format
pichillilorenzo Nov 26, 2024
6143eb3
publish new version 6.2.0-beta.2
pichillilorenzo Nov 26, 2024
b39c1e7
Merge branch 'v6.2.0-beta.2'
pichillilorenzo Nov 26, 2024
d0b93a0
updated changelog
pichillilorenzo Nov 26, 2024
9d1a1f3
Added saveState and restoreState methods to PlatformInAppWebViewContr…
pichillilorenzo Nov 27, 2024
ce09b08
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Nov 27, 2024
a1aa245
updated changelog, updated PlatformInAppWebViewController.restoreStat…
pichillilorenzo Nov 27, 2024
ae62261
android: added try catch in restoreState java impl
pichillilorenzo Nov 27, 2024
a470a3a
windows: fix WebViewEnvironment dispose crash
GooRingX Nov 28, 2024
7336f71
Update webview_environment.cpp
GooRingX Nov 28, 2024
4c16860
Merge branch 'GooringX-fix_windows-WebViewEnvironment_dispose_crash' …
pichillilorenzo Nov 28, 2024
d400cd2
updated changelog
pichillilorenzo Nov 28, 2024
d50a1b6
Merge branch 'GooRingX-GooringX-fix_windows-WebViewEnvironment_dispos…
pichillilorenzo Nov 28, 2024
70460cc
update README.md
allcontributors[bot] Nov 28, 2024
fadc30b
update .all-contributorsrc
allcontributors[bot] Nov 28, 2024
63f22b0
Merge pull request #2434 from pichillilorenzo/all-contributors/add-Go…
pichillilorenzo Nov 28, 2024
cd20aa3
updated readme
pichillilorenzo Nov 28, 2024
6b9690c
updated iOS proxy support
pichillilorenzo Nov 29, 2024
fc79c3a
Merge branch 'yerkejs-master' into v6.2.0-beta.3
pichillilorenzo Nov 29, 2024
cf24af5
update README.md
allcontributors[bot] Nov 29, 2024
ba838dd
update .all-contributorsrc
allcontributors[bot] Nov 29, 2024
f09c0af
Update .all-contributorsrc
pichillilorenzo Nov 29, 2024
32e4ffb
Update README.md
pichillilorenzo Nov 29, 2024
84e5e38
Merge pull request #2436 from pichillilorenzo/all-contributors/add-ye…
pichillilorenzo Nov 29, 2024
eb8fa8b
merge
pichillilorenzo Nov 29, 2024
720feab
Merge branch 'master' into v6.2.0-beta.3
pichillilorenzo Nov 29, 2024
c659e2d
macos: Implemented PlatformProxyController class
pichillilorenzo Nov 29, 2024
129622e
remove test ProxyController
pichillilorenzo Nov 29, 2024
f594728
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Nov 29, 2024
dfd3615
fix #2393, ios and macos: Fixed internal javascript callback handlers…
pichillilorenzo Nov 30, 2024
962f76c
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Nov 30, 2024
d92f880
revert printOperation.canSpawnSeparateThread
pichillilorenzo Nov 30, 2024
44c81ed
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Nov 30, 2024
0687430
macos: Fixed crash of unhandled onPrintRequest WebView event
pichillilorenzo Nov 30, 2024
4f81a3e
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Nov 30, 2024
68aa382
updated Android PlatformPrintJobController.onComplete implementation,…
pichillilorenzo Nov 30, 2024
a9f0876
Merge branch 'Doflatango-android-print-oncomplete' into v6.2.0-beta.3
pichillilorenzo Nov 30, 2024
844f29d
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Dec 1, 2024
20782d6
removed test code from example
pichillilorenzo Dec 1, 2024
4e4bbb5
Merge branch 'master' into v6.2.0-beta.3
pichillilorenzo Dec 1, 2024
d8f7484
fix #2197, Added useOnAjaxReadyStateChange and useOnAjaxProgress prop…
pichillilorenzo Dec 1, 2024
1e7091c
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Dec 1, 2024
48a9734
android: Implemented onShowFileChooser WebView event, platform-interf…
pichillilorenzo Dec 2, 2024
1ba712b
android: updated java ShowFileChooserResponse fromMap method
pichillilorenzo Dec 2, 2024
0aaf7a0
Merge branch 'v6.2.0-beta.3'
pichillilorenzo Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
99 changes: 99 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,105 @@
"contributions": [
"code"
]
},
{
"login": "nnnlog",
"name": "nlog (solrin)",
"avatar_url": "https://avatars.githubusercontent.com/u/20399222?v=4",
"profile": "https://nlog.dev",
"contributions": [
"code"
]
},
{
"login": "Murmurl912",
"name": "Murmurl912",
"avatar_url": "https://avatars.githubusercontent.com/u/36264246?v=4",
"profile": "https://github.com/Murmurl912",
"contributions": [
"code"
]
},
{
"login": "bschulz87",
"name": "Benjamin Schulz",
"avatar_url": "https://avatars.githubusercontent.com/u/30199362?v=4",
"profile": "https://github.com/bschulz87",
"contributions": [
"ideas"
]
},
{
"login": "ShuheiSuzuki-07",
"name": "seal-app",
"avatar_url": "https://avatars.githubusercontent.com/u/118415919?v=4",
"profile": "https://github.com/ShuheiSuzuki-07",
"contributions": [
"code"
]
},
{
"login": "takuyaaaaaaahaaaaaa",
"name": "Takuya Tominaga",
"avatar_url": "https://avatars.githubusercontent.com/u/31458194?v=4",
"profile": "https://github.com/takuyaaaaaaahaaaaaa",
"contributions": [
"code"
]
},
{
"login": "yamaha252",
"name": "Sergey",
"avatar_url": "https://avatars.githubusercontent.com/u/4444068?v=4",
"profile": "https://github.com/yamaha252",
"contributions": [
"code"
]
},
{
"login": "lyb5834",
"name": "yuanbo li",
"avatar_url": "https://avatars.githubusercontent.com/u/16265810?v=4",
"profile": "https://github.com/lyb5834",
"contributions": [
"code"
]
},
{
"login": "Mecharyry",
"name": "Ryan Feline",
"avatar_url": "https://avatars.githubusercontent.com/u/3380092?v=4",
"profile": "https://github.com/Mecharyry",
"contributions": [
"code"
]
},
{
"login": "fuzzybinary",
"name": "Jeff Ward",
"avatar_url": "https://avatars.githubusercontent.com/u/249982?v=4",
"profile": "https://fuzzybinary.com",
"contributions": [
"test"
]
},
{
"login": "yerkejs",
"name": "Yelzhan Yerkebulan",
"avatar_url": "https://avatars.githubusercontent.com/u/33483071?v=4",
"profile": "https://hero.io",
"contributions": [
"code"
]
},
{
"login": "GooRingX",
"name": "GooRingX",
"avatar_url": "https://avatars.githubusercontent.com/u/167741400?v=4",
"profile": "https://github.com/GooRingX",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Close Stale Issues

on:
schedule:
- cron: '0 * * * *' # Run every hour
- cron: '0 0 * * *' # Run every day at midnight

jobs:
close-issues:
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![InAppWebView-logo](https://user-images.githubusercontent.com/5956938/195422744-bdcfed16-73f0-4bc9-94ab-ecf10771a1c4.png)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-84-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-95-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![flutter_inappwebview version](https://img.shields.io/pub/v/flutter_inappwebview?include_prereleases)](https://pub.dartlang.org/packages/flutter_inappwebview)
Expand Down Expand Up @@ -191,6 +191,21 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gmackall"><img src="https://avatars.githubusercontent.com/u/34871572?v=4?s=100" width="100px;" alt="Gray Mackall"/><br /><sub><b>Gray Mackall</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=gmackall" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/p-mazhnik"><img src="https://avatars.githubusercontent.com/u/25964451?v=4?s=100" width="100px;" alt="Pavel Mazhnik"/><br /><sub><b>Pavel Mazhnik</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=p-mazhnik" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://nlog.dev"><img src="https://avatars.githubusercontent.com/u/20399222?v=4?s=100" width="100px;" alt="nlog (solrin)"/><br /><sub><b>nlog (solrin)</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=nnnlog" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Murmurl912"><img src="https://avatars.githubusercontent.com/u/36264246?v=4?s=100" width="100px;" alt="Murmurl912"/><br /><sub><b>Murmurl912</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Murmurl912" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bschulz87"><img src="https://avatars.githubusercontent.com/u/30199362?v=4?s=100" width="100px;" alt="Benjamin Schulz"/><br /><sub><b>Benjamin Schulz</b></sub></a><br /><a href="#ideas-bschulz87" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShuheiSuzuki-07"><img src="https://avatars.githubusercontent.com/u/118415919?v=4?s=100" width="100px;" alt="seal-app"/><br /><sub><b>seal-app</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=ShuheiSuzuki-07" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/takuyaaaaaaahaaaaaa"><img src="https://avatars.githubusercontent.com/u/31458194?v=4?s=100" width="100px;" alt="Takuya Tominaga"/><br /><sub><b>Takuya Tominaga</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=takuyaaaaaaahaaaaaa" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yamaha252"><img src="https://avatars.githubusercontent.com/u/4444068?v=4?s=100" width="100px;" alt="Sergey"/><br /><sub><b>Sergey</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=yamaha252" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lyb5834"><img src="https://avatars.githubusercontent.com/u/16265810?v=4?s=100" width="100px;" alt="yuanbo li"/><br /><sub><b>yuanbo li</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=lyb5834" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Mecharyry"><img src="https://avatars.githubusercontent.com/u/3380092?v=4?s=100" width="100px;" alt="Ryan Feline"/><br /><sub><b>Ryan Feline</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=Mecharyry" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://fuzzybinary.com"><img src="https://avatars.githubusercontent.com/u/249982?v=4?s=100" width="100px;" alt="Jeff Ward"/><br /><sub><b>Jeff Ward</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=fuzzybinary" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://hero.io"><img src="https://avatars.githubusercontent.com/u/33483071?v=4?s=100" width="100px;" alt="Yelzhan Yerkebulan"/><br /><sub><b>Yelzhan Yerkebulan</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=yerkejs" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/GooRingX"><img src="https://avatars.githubusercontent.com/u/167741400?v=4?s=100" width="100px;" alt="GooRingX"/><br /><sub><b>GooRingX</b></sub></a><br /><a href="https://github.com/pichillilorenzo/flutter_inappwebview/commits?author=GooRingX" title="Code">💻</a></td>
</tr>
</tbody>
</table>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.0

- Updated `ExchangeableEnum` and `ExchangeableObjectProperty`.

## 1.1.1

- Added `ExchangeableObject.fromMapForceAllInline`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ class ExchangeableEnum {
final bool fromValueMethod;
final bool toNativeValueMethod;
final bool fromNativeValueMethod;
final bool nameMethod;
final bool toNameMethod;
final bool byNameMethod;
final bool asNameMapMethod;
final bool toStringMethod;
final bool hashCodeMethod;
final bool equalsOperator;
Expand All @@ -15,6 +19,10 @@ class ExchangeableEnum {
this.fromValueMethod = true,
this.toNativeValueMethod = true,
this.fromNativeValueMethod = true,
this.nameMethod = true,
this.toNameMethod = true,
this.byNameMethod = true,
this.asNameMapMethod = true,
this.toStringMethod = true,
this.hashCodeMethod = true,
this.equalsOperator = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
class ExchangeableObjectProperty {
final Function? serializer;
final Function? deserializer;
final bool deprecatedUseNewFieldNameInConstructor;
final bool deprecatedUseNewFieldNameInFromMapMethod;
final bool leaveDeprecatedInFromMapMethod;
final bool leaveDeprecatedInToMapMethod;

const ExchangeableObjectProperty({
this.serializer,
this.deserializer
this.deserializer,
this.deprecatedUseNewFieldNameInConstructor = true,
this.deprecatedUseNewFieldNameInFromMapMethod = true,
this.leaveDeprecatedInFromMapMethod = false,
this.leaveDeprecatedInToMapMethod = false,
});
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_inappwebview_internal_annotations
description: Internal annotations used by the generator of flutter_inappwebview plugin
version: 1.1.1
version: 1.2.0
homepage: https://github.com/pichillilorenzo/flutter_inappwebview

environment:
Expand Down
92 changes: 78 additions & 14 deletions dev_packages/generators/lib/src/exchangeable_enum_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ class ExchangeableEnumGenerator
}

if (annotation.read("fromValueMethod").boolValue && (!visitor.methods.containsKey("fromValue") ||
Util.methodHasIgnore(visitor.methods['fromNativeValue']!))) {
Util.methodHasIgnore(visitor.methods['fromValue']!))) {
final hasBitwiseOrOperator =
annotation.read("bitwiseOrOperator").boolValue;
classBuffer.writeln("""
///Gets a possible [$extClassName] instance from [${enumValue.type}] value.
static $extClassName? fromValue(${enumValue.type}${!Util.typeIsNullable(enumValue.type) ? '?' : ''} value) {
if (value != null) {
if (value != null) {
try {
return $extClassName.values
.firstWhere((element) => element.toValue() == value);
Expand All @@ -230,7 +230,7 @@ class ExchangeableEnumGenerator
classBuffer.writeln("""
///Gets a possible [$extClassName] instance from a native value.
static $extClassName? fromNativeValue(${enumNativeValue.type}${!Util.typeIsNullable(enumNativeValue.type) ? '?' : ''} value) {
if (value != null) {
if (value != null) {
try {
return $extClassName.values
.firstWhere((element) => element.toNativeValue() == value);
Expand All @@ -243,6 +243,44 @@ class ExchangeableEnumGenerator
""");
}

if (annotation.read("nameMethod").boolValue && annotation.read("byNameMethod").boolValue &&
(!visitor.methods.containsKey("byName") || Util.methodHasIgnore(visitor.methods['byName']!))) {
classBuffer.writeln("""
/// Gets a possible [$extClassName] instance value with name [name].
///
/// Goes through [$extClassName.values] looking for a value with
/// name [name], as reported by [$extClassName.name].
/// Returns the first value with the given name, otherwise `null`.
static $extClassName? byName(String? name) {
if (name != null) {
try {
return $extClassName.values
.firstWhere((element) => element.name() == name);
} catch (e) {
return null;
}
}
return null;
}
""");
}

if (annotation.read("nameMethod").boolValue && annotation.read("asNameMapMethod").boolValue &&
(!visitor.methods.containsKey("asNameMap") || Util.methodHasIgnore(visitor.methods['asNameMap']!))) {
classBuffer.writeln("""
/// Creates a map from the names of [$extClassName] values to the values.
///
/// The collection that this method is called on is expected to have
/// values with distinct names, like the `values` list of an enum class.
/// Only one value for each name can occur in the created map,
/// so if two or more values have the same name (either being the
/// same value, or being values of different enum type), at most one of
/// them will be represented in the returned map.
static Map<String, $extClassName> asNameMap() =>
<String, $extClassName>{for (final value in $extClassName.values) value.name(): value};
""");
}

for (final entry in methodEntriesSorted) {
final methodElement = entry.value;
if (Util.methodHasIgnore(methodElement)) {
Expand Down Expand Up @@ -282,6 +320,28 @@ class ExchangeableEnumGenerator
""");
}

if (annotation.read("nameMethod").boolValue && (!visitor.methods.containsKey("name") ||
Util.methodHasIgnore(visitor.methods['name']!))) {
classBuffer.writeln('///Gets the name of the value.');
classBuffer.writeln('String name() {');
classBuffer.writeln('switch(_value) {');
for (final entry in fieldEntriesSorted) {
final fieldName = entry.key;
final fieldElement = entry.value;
if (!fieldElement.isPrivate && fieldElement.isStatic) {
final fieldValue = fieldElement.computeConstantValue()?.getField("_value");
dynamic constantValue = fieldValue?.toIntValue();
if (enumValue.type.isDartCoreString) {
constantValue = "'${fieldValue?.toStringValue()}'";
}
classBuffer.writeln("case $constantValue: return '$fieldName';");
}
}
classBuffer.writeln('}');
classBuffer.writeln('return _value.toString();');
classBuffer.writeln('}');
}

if (annotation.read("hashCodeMethod").boolValue && (!visitor.fields.containsKey("hashCode") ||
Util.methodHasIgnore(visitor.methods['hashCode']!))) {
classBuffer.writeln("""
Expand Down Expand Up @@ -315,19 +375,23 @@ class ExchangeableEnumGenerator
if (enumValue.type.isDartCoreString) {
classBuffer.writeln('return _value;');
} else {
classBuffer.writeln('switch(_value) {');
for (final entry in fieldEntriesSorted) {
final fieldName = entry.key;
final fieldElement = entry.value;
if (!fieldElement.isPrivate && fieldElement.isStatic) {
final fieldValue =
fieldElement.computeConstantValue()?.getField("_value");
final constantValue = fieldValue?.toIntValue();
classBuffer.writeln("case $constantValue: return '$fieldName';");
if (annotation.read("nameMethod").boolValue) {
classBuffer.writeln('return name();');
} else {
classBuffer.writeln('switch(_value) {');
for (final entry in fieldEntriesSorted) {
final fieldName = entry.key;
final fieldElement = entry.value;
if (!fieldElement.isPrivate && fieldElement.isStatic) {
final fieldValue =
fieldElement.computeConstantValue()?.getField("_value");
final constantValue = fieldValue?.toIntValue();
classBuffer.writeln("case $constantValue: return '$fieldName';");
}
}
classBuffer.writeln('}');
classBuffer.writeln('return _value.toString();');
}
classBuffer.writeln('}');
classBuffer.writeln('return _value.toString();');
}
classBuffer.writeln('}');
}
Expand Down
Loading