This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webview_flutter_platform_interface] Updates platform interface to ne…
…w interface (#6846) * Set new interface in main * update pubspec changelog and readme * exclude from all plugins app test * delete all of platform interface * add all back to platform interface
- Loading branch information
1 parent
3a093e4
commit 78de28c
Showing
58 changed files
with
606 additions
and
1,539 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
...w_flutter/webview_flutter_platform_interface/lib/src/legacy/types/javascript_message.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/// A message that was sent by JavaScript code running in a [WebView]. | ||
class JavascriptMessage { | ||
/// Constructs a JavaScript message object. | ||
/// | ||
/// The `message` parameter must not be null. | ||
const JavascriptMessage(this.message) : assert(message != null); | ||
|
||
/// The contents of the message that was sent by the JavaScript code. | ||
final String message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...w_flutter/webview_flutter_platform_interface/lib/src/legacy/types/web_resource_error.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'web_resource_error_type.dart'; | ||
|
||
/// Error returned in `WebView.onWebResourceError` when a web resource loading error has occurred. | ||
class WebResourceError { | ||
/// Creates a new [WebResourceError] | ||
/// | ||
/// A user should not need to instantiate this class, but will receive one in | ||
/// [WebResourceErrorCallback]. | ||
WebResourceError({ | ||
required this.errorCode, | ||
required this.description, | ||
this.domain, | ||
this.errorType, | ||
this.failingUrl, | ||
}) : assert(errorCode != null), | ||
assert(description != null); | ||
|
||
/// Raw code of the error from the respective platform. | ||
/// | ||
/// On Android, the error code will be a constant from a | ||
/// [WebViewClient](https://developer.android.com/reference/android/webkit/WebViewClient#summary) and | ||
/// will have a corresponding [errorType]. | ||
/// | ||
/// On iOS, the error code will be a constant from `NSError.code` in | ||
/// Objective-C. See | ||
/// https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorObjectsDomains/ErrorObjectsDomains.html | ||
/// for more information on error handling on iOS. Some possible error codes | ||
/// can be found at https://developer.apple.com/documentation/webkit/wkerrorcode?language=objc. | ||
final int errorCode; | ||
|
||
/// The domain of where to find the error code. | ||
/// | ||
/// This field is only available on iOS and represents a "domain" from where | ||
/// the [errorCode] is from. This value is taken directly from an `NSError` | ||
/// in Objective-C. See | ||
/// https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorObjectsDomains/ErrorObjectsDomains.html | ||
/// for more information on error handling on iOS. | ||
final String? domain; | ||
|
||
/// Description of the error that can be used to communicate the problem to the user. | ||
final String description; | ||
|
||
/// The type this error can be categorized as. | ||
/// | ||
/// This will never be `null` on Android, but can be `null` on iOS. | ||
final WebResourceErrorType? errorType; | ||
|
||
/// Gets the URL for which the resource request was made. | ||
/// | ||
/// This value is not provided on iOS. Alternatively, you can keep track of | ||
/// the last values provided to [WebViewPlatformController.loadUrl]. | ||
final String? failingUrl; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.