Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 3151008

Browse files
committed
Renamed loadHtml to loadHtmlString
1 parent 4b7a63f commit 3151008

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

packages/webview_flutter/webview_flutter_platform_interface/lib/src/method_channel/webview_method_channel.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ class MethodChannelWebViewPlatform implements WebViewPlatformController {
8686
}
8787

8888
@override
89-
Future<void> loadHtml(
89+
Future<void> loadHtmlString(
9090
String html, {
9191
String? baseUrl,
9292
}) async {
9393
assert(html != null);
94-
return _channel.invokeMethod<void>('loadHtml', <String, dynamic>{
94+
return _channel.invokeMethod<void>('loadHtmlString', <String, dynamic>{
9595
'html': html,
9696
'baseUrl': baseUrl,
9797
});

packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform_controller.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ abstract class WebViewPlatformController {
3434
"WebView loadFlutterAsset is not implemented on the current platform");
3535
}
3636

37-
/// Loads the supplied HTML.
37+
/// Loads the supplied HTML string.
3838
///
3939
/// The [baseUrl] parameter is used when resolving relative URLs within the
4040
/// HTML string.
41-
Future<void> loadHtml(
41+
Future<void> loadHtmlString(
4242
String html, {
4343
String? baseUrl,
4444
}) {
4545
throw UnimplementedError(
46-
"WebView loadHtml is not implemented on the current platform");
46+
"WebView loadHtmlString is not implemented on the current platform");
4747
}
4848

4949
/// Loads the specified URL.

packages/webview_flutter/webview_flutter_platform_interface/test/src/method_channel/webview_method_channel_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ void main() {
7171
);
7272
});
7373

74-
test('loadHtml without base URL', () async {
75-
await webViewPlatform.loadHtml(
74+
test('loadHtmlString without base URL', () async {
75+
await webViewPlatform.loadHtmlString(
7676
'Test HTML string',
7777
);
7878

7979
expect(
8080
log,
8181
<Matcher>[
8282
isMethodCall(
83-
'loadHtml',
83+
'loadHtmlString',
8484
arguments: <String, String?>{
8585
'html': 'Test HTML string',
8686
'baseUrl': null,
@@ -90,8 +90,8 @@ void main() {
9090
);
9191
});
9292

93-
test('loadHtml without base URL', () async {
94-
await webViewPlatform.loadHtml(
93+
test('loadHtmlString without base URL', () async {
94+
await webViewPlatform.loadHtmlString(
9595
'Test HTML string',
9696
baseUrl: 'https://flutter.dev',
9797
);
@@ -100,7 +100,7 @@ void main() {
100100
log,
101101
<Matcher>[
102102
isMethodCall(
103-
'loadHtml',
103+
'loadHtmlString',
104104
arguments: <String, String?>{
105105
'html': 'Test HTML string',
106106
'baseUrl': 'https://flutter.dev',

0 commit comments

Comments
 (0)