From 8d52ab40012801686ef6975d098c6d1cdb000dc0 Mon Sep 17 00:00:00 2001 From: JaffaKetchup Date: Sun, 17 Nov 2024 21:38:54 +0000 Subject: [PATCH] Fixed bug --- lib/src/layer/tile_layer/tile_layer.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/layer/tile_layer/tile_layer.dart b/lib/src/layer/tile_layer/tile_layer.dart index 70f99e655..3ff6cdbda 100644 --- a/lib/src/layer/tile_layer/tile_layer.dart +++ b/lib/src/layer/tile_layer/tile_layer.dart @@ -338,11 +338,12 @@ class TileLayer extends StatefulWidget { ? (zoomReverse ? zoomOffset - 1.0 : zoomOffset + 1.0) : zoomOffset; // Deprecated assignment - if (tileSize case final tileSize?) { - // ignore: deprecated_member_use_from_same_package - this.tileSize = - useSimulatedRetina ? (tileSize / 2.0).floorToDouble() : tileSize; - } + // ignore: deprecated_member_use_from_same_package + this.tileSize = tileSize == null + ? null + : useSimulatedRetina + ? (tileSize / 2).floorToDouble() + : tileSize; this.tileDimension = useSimulatedRetina ? tileDimension ~/ 2 : tileDimension; }