reportDone method

Future<RequestTracker> reportDone()

Stops tracking an HTTP request.

Immediately after receiving a response or an error set the appropriate properties and call this method to report the outcome of the HTTP request. You should not continue to use this object after calling this method -- if you need to track another request, create another RequestTracker.

Method might throw Exception.

Implementation

Future<RequestTracker> reportDone() async {
  try {
    final args = {
      "id": id,
    };
    await channel.invokeMethod<void>('requestTrackerReport', args);
    return this;
  } on PlatformException catch (e) {
    throw Exception(e.details);
  }
}