onHttp static method
Subscribes to HTTP sync events.
Implementation
static StreamSubscription<HttpEvent> onHttp(
void Function(HttpEvent) callback, {
Function? onError,
}) {
return events
.where((event) => event.type == EventType.http)
.cast<GeolocationEvent<HttpEvent>>()
.map((event) => event.data)
.listen(callback, onError: onError);
}