stopResourceLoading method
Notifies that the Resource stops being loaded.
errorMessage
and statusCode
/kind
cannot be used in conjunction.
If errorMessage
is present, statusCode
will not be reported on iOS
but will be reported together on Android.
kind
is one of "document", "xhr", "beacon", "fetch", "css", "js",
"image". "font", "media", "other". Defaults to fetch
.
attributes
will not be reported if errorMessage
is present
on Android.
This is not invoked and resolves silently when using Flutter web.
Implementation
Future<void> stopResourceLoading(
String key, {
int? statusCode,
String? errorMessage,
String kind = 'fetch',
Map<String, dynamic> attributes = const <String, dynamic>{},
}) async {
return await channel.invokeMethod('resourceStopLoading', {
'key': key,
'errorMessage': errorMessage,
'kind': kind,
'statusCode': statusCode,
'attributes': platform.isIOS ? jsonEncode(attributes) : attributes,
});
}