buildPlatform static method

BuildPlatform buildPlatform(
  1. String platform
)

Resolves the build platform associated with the specified platform.

Throws an UnsupportedError when the platform is not supported.

Implementation

static BuildPlatform buildPlatform(
  String platform,
) {
  switch (platform) {
    case 'android':
      return BuildPlatform.apk;

    case 'ios':
      return BuildPlatform.ipa;

    case 'web':
      return BuildPlatform.web;

    default:
      throw UnsupportedError(
        'Unsupported platform: $platform',
      );
  }
}