-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[webview_flutter_platform_interface] Provide flexible API for loading local HTML files #9697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[webview_flutter_platform_interface] Provide flexible API for loading local HTML files #9697
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new, more flexible API for loading local HTML files by adding a LoadFileParams
class and a loadFileWithParams
method to PlatformWebViewController
. The changes include updates to the platform interface, new tests for the added functionality, and corresponding documentation and version updates. My review focuses on improving documentation clarity and consistency. Overall, the changes are well-implemented and tested.
.../webview_flutter/webview_flutter_platform_interface/lib/src/platform_webview_controller.dart
Outdated
Show resolved
Hide resolved
packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/load_file_params.dart
Outdated
Show resolved
Hide resolved
1d4903e
to
59be663
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with change to make class base
/// } | ||
/// ``` | ||
@immutable | ||
class LoadFileParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This can be made into a base class to ensure it is extended.
class LoadFileParams { | |
base class LoadFileParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added base
modifier.
flutter/flutter#136479 • Added LoadFileParams to specify parameters for loading local HTML pages. • PlatformWebViewController class extended with the new method loadFileWithParams(LoadFileParams).
59be663
to
8adf1da
Compare
…or loading local HTML files (flutter/packages#9697)
flutter/packages@f0645d8...1a72287 2025-08-01 [email protected] Add an initial AGENTS.md (flutter/packages#9716) 2025-08-01 [email protected] Roll Flutter from c3279ca to 871849e (56 revisions) (flutter/packages#9728) 2025-08-01 [email protected] [webview_flutter_platform_interface] Provide flexible API for loading local HTML files (flutter/packages#9697) 2025-08-01 [email protected] Extending Timeout on `Linux_android android_build_all_packages *` (flutter/packages#9717) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#173215) flutter/packages@f0645d8...1a72287 2025-08-01 [email protected] Add an initial AGENTS.md (flutter/packages#9716) 2025-08-01 [email protected] Roll Flutter from c3279ca to 871849e (56 revisions) (flutter/packages#9728) 2025-08-01 [email protected] [webview_flutter_platform_interface] Provide flexible API for loading local HTML files (flutter/packages#9697) 2025-08-01 [email protected] Extending Timeout on `Linux_android android_build_all_packages *` (flutter/packages#9717) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#173215) flutter/packages@f0645d8...1a72287 2025-08-01 [email protected] Add an initial AGENTS.md (flutter/packages#9716) 2025-08-01 [email protected] Roll Flutter from c3279ca to 871849e (56 revisions) (flutter/packages#9728) 2025-08-01 [email protected] [webview_flutter_platform_interface] Provide flexible API for loading local HTML files (flutter/packages#9697) 2025-08-01 [email protected] Extending Timeout on `Linux_android android_build_all_packages *` (flutter/packages#9717) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#173215) flutter/packages@f0645d8...1a72287 2025-08-01 [email protected] Add an initial AGENTS.md (flutter/packages#9716) 2025-08-01 [email protected] Roll Flutter from c3279ca to 871849e (56 revisions) (flutter/packages#9728) 2025-08-01 [email protected] [webview_flutter_platform_interface] Provide flexible API for loading local HTML files (flutter/packages#9697) 2025-08-01 [email protected] Extending Timeout on `Linux_android android_build_all_packages *` (flutter/packages#9717) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter#136479
These are the platform interface changes, after the main PR was approved.
#8787
What was changed:
LoadFileParams
to specify parameters for loading local HTML pages.PlatformWebViewController
class extended with the new methodloadFileWithParams(LoadFileParams)
.PlatformWebViewController
were added.Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under[^1].CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under[^1].///
).