startResourceLoading method
Notifies that the Resource starts being loaded from given url
.
key
should be a uniquely generated identifier. This identifier
should be used by stopLoading
when ready.
method
should be an uppercase HTTP method.
This is not invoked and resolves silently when using Flutter web.
Implementation
Future<void> startResourceLoading(
String key, {
required String url,
String method = 'GET',
Map<String, dynamic> attributes = const <String, dynamic>{},
}) async {
return await channel.invokeMethod('resourceStartLoading', {
'key': key,
'url': url,
'method': method.toUpperCase(),
'attributes': platform.isIOS ? jsonEncode(attributes) : attributes,
});
}