mapBitmapScalingFromString function

  1. @visibleForTesting
MapBitmapScaling mapBitmapScalingFromString(
  1. String mode
)

Convert a string from provided JSON to a MapBitmapScaling enum.

Implementation

@visibleForTesting
MapBitmapScaling mapBitmapScalingFromString(String mode) => switch (mode) {
      'auto' => MapBitmapScaling.auto,
      'none' => MapBitmapScaling.none,
      _ => throw ArgumentError('Unrecognized MapBitmapScaling $mode', 'mode'),
    };