getMarkerIcon function Null safety

Future getMarkerIcon(
  1. Function converter,
  2. String imagePath
)

converter to asset files BitmapDescriptor.fromAssetImage,

Implementation

Future getMarkerIcon(Function converter, String imagePath) async {
  final icon = await converter(
    ImageConfiguration.empty,
    imagePath,
  );
  return icon;
}