LoadRequestParams class
Defines the parameters that can be used to load a page with the PlatformWebViewController.
Platform specific implementations can add additional fields by extending this class.
{@tool sample} This example demonstrates how to extend the LoadRequestParams to provide additional platform specific parameters.
When extending LoadRequestParams additional parameters should always
accept null
or have a default value to prevent breaking changes.
class AndroidLoadRequestParams extends LoadRequestParams {
AndroidLoadRequestParams._({
required LoadRequestParams params,
this.historyUrl,
}) : super(
uri: params.uri,
method: params.method,
body: params.body,
headers: params.headers,
);
factory AndroidLoadRequestParams.fromLoadRequestParams(
LoadRequestParams params, {
Uri? historyUrl,
}) {
return AndroidLoadRequestParams._(params, historyUrl: historyUrl);
}
final Uri? historyUrl;
}
{@end-tool}
- Annotations
Constructors
-
LoadRequestParams({required Uri uri, LoadRequestMethod method = LoadRequestMethod.get, Map<
String, String> headers = const <String, String>{}, Uint8List? body}) -
Used by the platform implementation to create a new LoadRequestParams.
const
Properties
- body → Uint8List?
-
HTTP body for the request.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Headers for the request.
final
- method → LoadRequestMethod
-
HTTP method used to make the request.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri
-
URI for the request.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited