Skip to content

Commit

Permalink
Fixed dark mode tiles affecting satellite
Browse files Browse the repository at this point in the history
  • Loading branch information
YarosMallorca committed Nov 1, 2024
1 parent e7178ff commit 6631d7c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/layouts/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,12 @@ class _HomeLayoutState extends State<HomeLayout> 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}',
Expand Down

0 comments on commit 6631d7c

Please sign in to comment.