From 3e67dee24e11c28744279f6a2f9b115be83c83d9 Mon Sep 17 00:00:00 2001 From: Simon Lightfoot Date: Tue, 14 Jan 2025 16:54:07 +0000 Subject: [PATCH] fix: use `Client` instead of `BaseClient` in network tile/image provider (#2011) --- .../tile_layer/tile_provider/network_image_provider.dart | 2 +- .../layer/tile_layer/tile_provider/network_tile_provider.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/layer/tile_layer/tile_provider/network_image_provider.dart b/lib/src/layer/tile_layer/tile_provider/network_image_provider.dart index c69e7c783..0a2a3d02c 100644 --- a/lib/src/layer/tile_layer/tile_provider/network_image_provider.dart +++ b/lib/src/layer/tile_layer/tile_provider/network_image_provider.dart @@ -32,7 +32,7 @@ class MapNetworkImageProvider extends ImageProvider { /// The HTTP client to use to make network requests /// /// Not included in [operator==]. - final BaseClient httpClient; + final Client httpClient; /// Whether to ignore exceptions and errors that occur whilst fetching tiles /// over the network, and just return a transparent tile diff --git a/lib/src/layer/tile_layer/tile_provider/network_tile_provider.dart b/lib/src/layer/tile_layer/tile_provider/network_tile_provider.dart index 233a5b758..f4975d630 100644 --- a/lib/src/layer/tile_layer/tile_provider/network_tile_provider.dart +++ b/lib/src/layer/tile_layer/tile_provider/network_tile_provider.dart @@ -34,7 +34,7 @@ class NetworkTileProvider extends TileProvider { /// [not yet supported in Dart](https://github.com/dart-lang/http/issues/424). NetworkTileProvider({ super.headers, - BaseClient? httpClient, + Client? httpClient, this.silenceExceptions = false, }) : _httpClient = httpClient ?? RetryClient(Client()); @@ -45,7 +45,7 @@ class NetworkTileProvider extends TileProvider { /// Long living client used to make all tile requests by /// [MapNetworkImageProvider] for the duration that this provider is /// alive - final BaseClient _httpClient; + final Client _httpClient; /// Each [Completer] is completed once the corresponding tile has finished /// loading