createHttpClient method
Returns a new HttpClient using the given context
.
When this override is installed, this function overrides the behavior of
new HttpClient
.
Implementation
@override
HttpClient createHttpClient(SecurityContext? context) {
if (_wrappedOverrides != null) {
return _wrappedOverrides!.createHttpClient(context);
}
// super call is crucial here -> it actually creates the instance of
// the built-in HttpClient IMPL
// https://github.com/flutter/flutter/issues/19588#issuecomment-406771070
return BugseeHttpClient(super.createHttpClient(context));
}