From 0dfb521aa25aad1c1f25126af435dc069c6309f5 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Thu, 10 May 2018 20:12:01 +0800 Subject: [PATCH] Add backgroundColor option to tile layer, fix #35 --- flutter_map/lib/src/layer/tile_layer.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flutter_map/lib/src/layer/tile_layer.dart b/flutter_map/lib/src/layer/tile_layer.dart index fec802729..55ccc798e 100644 --- a/flutter_map/lib/src/layer/tile_layer.dart +++ b/flutter_map/lib/src/layer/tile_layer.dart @@ -18,6 +18,7 @@ class TileLayerOptions extends LayerOptions { final bool zoomReverse; final double zoomOffset; final List subdomains; + final Color backgroundColor; Map additionalOptions; TileLayerOptions({ @@ -28,6 +29,7 @@ class TileLayerOptions extends LayerOptions { this.zoomOffset = 0.0, this.additionalOptions = const {}, this.subdomains = const [], + this.backgroundColor = Colors.grey[300], }); } @@ -277,7 +279,7 @@ class _TileLayerState extends State { child: new Stack( children: tileWidgets, ), - color: Colors.grey[300], + color: this.options.backgroundColor, ); }