getScaleForDevicePixelRatio function Null safety

MapScale getScaleForDevicePixelRatio(
  1. double devicePixelRatio
)

Implementation

MapScale getScaleForDevicePixelRatio(double devicePixelRatio) {
  if (devicePixelRatio <= 1) {
    return MapScale.scale1;
  } else if (devicePixelRatio <= 2) {
    return MapScale.scale2;
  } else {
    return MapScale.scale4;
  }
}