diff --git a/CHANGELOG.md b/CHANGELOG.md index ebe79c1..34accc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Added + +- Enables `InstabugHttpClient` to wrap an internal `http` client. + ## [2.5.0] - 18/11/2024 ### Added diff --git a/lib/instabug_http_client.dart b/lib/instabug_http_client.dart index 25ec7a2..7cff298 100644 --- a/lib/instabug_http_client.dart +++ b/lib/instabug_http_client.dart @@ -14,7 +14,11 @@ import 'package:instabug_http_client/instabug_http_logger.dart'; import 'package:meta/meta.dart'; class InstabugHttpClient extends InstabugHttpLogger implements http.Client { - InstabugHttpClient() : client = http.Client() { + // InstabugHttpClient() : client = http.Client() { + // logger = this; + // } + + InstabugHttpClient({http.Client? client}) : client = client ?? http.Client() { logger = this; }