platformMapBitmapScalingFromScaling static method
PlatformMapBitmapScaling
platformMapBitmapScalingFromScaling(
- MapBitmapScaling scaling
Converts MapBitmapScaling from platform interface to PlatformMapBitmapScaling Pigeon.
Implementation
@visibleForTesting
static PlatformMapBitmapScaling platformMapBitmapScalingFromScaling(
MapBitmapScaling scaling,
) {
switch (scaling) {
case MapBitmapScaling.auto:
return PlatformMapBitmapScaling.auto;
case MapBitmapScaling.none:
return PlatformMapBitmapScaling.none;
}
// The enum comes from a different package, which could get a new value at
// any time, so provide a fallback that ensures this won't break when used
// with a version that contains new values. This is deliberately outside
// the switch rather than a `default` so that the linter will flag the
// switch as needing an update.
// ignore: dead_code
return PlatformMapBitmapScaling.auto;
}