File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
packages/desktop_webview_window Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,15 @@ Show a webview window on your flutter desktop application.
3737 webview.launch("https://example.com");
3838 ```
3939
40- ### ** linux requirement**
40+ ## linux requirement
4141
4242``` shell
4343sudo apt-get install webkit2gtk-4.1
4444```
4545
46- ### ** Windows requirement**
46+ ## Windows
47+
48+ ### Requirement
4749
4850The backend of desktop_webview_window on Windows is WebView2, which requires ** WebView2 Runtime** installed.
4951
@@ -54,6 +56,22 @@ See more: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/dist
5456
5557For convenience, you can use ` WebviewWindow.isWebviewAvailable() ` check whether the WebView2 is available.
5658
59+ ### Attention
60+
61+ The default user data folder of WebView2 is ` your_exe_file\WebView2 ` , which is not a good place to store user data.
62+
63+ eg. if the application is installed in a read-only directory, the application will crash when WebView2 try to write data.
64+
65+ you can use ` WebviewWindow.create() ` to create a webview with a custom user data folder.
66+
67+ ``` dart
68+ final webview = await WebviewWindow.create(
69+ confiruation: CreateConfiguration(
70+ userDataFolderWindows: 'your_custom_user_data_folder',
71+ ),
72+ );
73+ ```
74+
5775## License
5876
5977see [ LICENSE] ( ./LICENSE )
You can’t perform that action at this time.
0 commit comments