From 6631d7cb6daafa882b128a005cd02e947bcf6823 Mon Sep 17 00:00:00 2001 From: Yaros Date: Fri, 1 Nov 2024 21:59:16 +0100 Subject: [PATCH] Fixed dark mode tiles affecting satellite --- lib/layouts/home.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/layouts/home.dart b/lib/layouts/home.dart index a2b6ba1..0f1e37d 100644 --- a/lib/layouts/home.dart +++ b/lib/layouts/home.dart @@ -231,10 +231,12 @@ class _HomeLayoutState extends State with TickerProviderStateMixin { children: [ TileLayer( tileProvider: CancellableNetworkTileProvider(), - tileBuilder: Theme.of(context).brightness == Brightness.dark - ? (context, tileWidget, tile) => - darkModeTileBuilder(context, tileWidget, tile) - : null, + tileBuilder: + Theme.of(context).brightness == Brightness.dark && + _selectedMapLayer == MapLayer.streets + ? (context, tileWidget, tile) => + darkModeTileBuilder(context, tileWidget, tile) + : null, urlTemplate: _selectedMapLayer == MapLayer.streets ? 'https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}' : 'https://{s}.google.com/vt/lyrs=y&x={x}&y={y}&z={z}',