osm_flutter
                                
                                 osm_flutter copied to clipboard
                                
                                    osm_flutter copied to clipboard
                            
                            
                            
                        changeLocationMarker() null cannot be cast to non-null
Hey, can u please help with this problem? I want first time add marker to map and then just changelocation of this marker. I have something like this in my code
setupMarker(){
  if (oldLocation!= null) {
     await controller.changeLocationMarker(oldLocation: oldLocation, newLocation: geo,markerIcon: icon);
  } else {
     await controller.addMarker(geo, markerIcon: icon);
     oldLocation = geo;
  }
}
if method changeLocationMarker() is called i got this error (only if i add markerIcon parameter)
java.lang.NullPointerException: null cannot be cast to non-null type kotlin.ByteArray
E/AndroidRuntime(20508): 	at hamza.dali.flutter_osm_plugin.FlutterOsmView$changePositionMarker$1.invokeSuspend(FlutterOsmView.kt:591)