maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
186 stars 106 forks source link

Add null check to layer#setVisibility on Android #374

Closed polylina closed 5 months ago

polylina commented 5 months ago

In our app there is a possibility to switch between map layers, and the amount of layers varies over time. In some cases, this leads to a NullPointerException in the current version of the library on Android. This PR fixes it. The iOS code has null checks implemented already.