Skip to content

readAccessUrl of the webview_flutter_wkwebview should be accessible for customization #136479

@agavrilko

Description

@agavrilko

Is there an existing issue for this?

Use case

The issue is related to WKWebView, as it requires a separate URL for resource location if we load the local HTML file.

The current implementation of the loadFile is the following
image

Which only works for the following structure
root/
....css/
........styles.css
....js/
........func.js
....index.html

And makes it impossible to work if we have something like in the example below
root/
....css/
........styles.css
....js/
........func.js
....en/
........index.html
....ua/
........index.html

Proposal

The easiest solution would be to allow the configuration readAccessUrl as an optional argument
image

However, since this is a WKWebView-related issue,
might be a good idea to extend the WebKitWebViewController.

Something as the following, or any other way which we could use to customize the path
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.team-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions