I am using google_maps_flutter
in my flutter app to use google map I have custom marker icon and I load this with BitmapDescriptor.fromAsset(\"images/car.
So you can try the Ugly way . MediaQuery will return the ratio and check for conditions manually something Like so
double mq = MediaQuery.of(context).devicePixelRatio;
String icon = "images/car.png";
if (mq>1.5 && mq<2.5) {icon = "images/car2.png";}
else if(mq >= 2.5){icon = "images/car3.png";}
mapController.addMarker(
MarkerOptions(
icon: BitmapDescriptor.fromAsset(icon),
position: LatLng(37.4219999, -122.0862462),
),
);
you need to add your different assets images in your images folder like
-images/car.png
-images/car2.png
-images/car3.png