Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Prev Previous commit
Next Next commit
Update webview_flutter.dart
  • Loading branch information
Wian-TMC authored Jan 28, 2021
commit 04943afa0e3f9404dbad44dd48f7c8890fe986a1
16 changes: 16 additions & 0 deletions packages/webview_flutter/lib/webview_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,22 @@ class WebViewController {
_validateUrlString(url);
return _webViewPlatformController.loadUrl(url, headers);
}

/// Load html file from assets
///
/// `url` must not be null.
Future<void> loadAssetHtmlFile(String url) async {
assert(url != null);
return _webViewPlatformController.loadAssetHtmlFile(url);
}

/// Load html file from local path
///
/// `url` must not be null.
Future<void> loadLocalHtmlFile(String url) async {
assert(url != null);
return _webViewPlatformController.loadLocalHtmlFile(url);
}

/// Accessor to the current URL that the WebView is displaying.
///
Expand Down