diff --git a/lib/src/layer/tile_layer/tile_provider/network_image_with_retry.dart b/lib/src/layer/tile_layer/tile_provider/network_image_with_retry.dart index 574a54c43..e073186dd 100644 --- a/lib/src/layer/tile_layer/tile_provider/network_image_with_retry.dart +++ b/lib/src/layer/tile_layer/tile_provider/network_image_with_retry.dart @@ -10,23 +10,13 @@ class NetworkImageWithRetry extends ImageProvider { /// The scale to place in the [ImageInfo] object of the image. final double scale; - /// - final String? expectedFormat; - /// The http RetryClient that is used for the requests late RetryClient retryClient; - NetworkImageWithRetry(this.url, {this.scale = 1.0, this.expectedFormat}) { - if (expectedFormat == null) { - retryClient = RetryClient( - Client(), - ); - } else { - retryClient = RetryClient( - Client(), - when: (p0) => p0.headers['content-type'] == expectedFormat, - ); - } + NetworkImageWithRetry(this.url, + {this.scale = 1.0, RetryClient? retryClient}) { + retryClient = retryClient ?? RetryClient(Client()); + } @override