create static method

Future<RequestTracker> create(
  1. String url
)

Creates a RequestTracker to be configured for manually tracking an HTTP request to track it manually, with a non-null url and after having called Instrumentation.start.

Method might throw Exception.

Implementation

static Future<RequestTracker> create(String url) async {
  try {
    final tracker = RequestTracker._();
    final args = {"id": tracker.id, "url": url};
    await channel.invokeMethod<void>('getRequestTrackerWithUrl', args);
    return tracker;
  } on PlatformException catch (e) {
    throw Exception(e.details);
  }
}