getPlatformData method

  1. @visibleForTesting
PlatformData? getPlatformData(
  1. String os,
  2. Metadata data
)

Implementation

@visibleForTesting
PlatformData? getPlatformData(String os, Metadata data) {
  if (os == 'ios') {
    return data.ios;
  } else if (os == 'android') {
    return data.android;
  } else if (os == 'windows') {
    return data.windows;
  } else if (os == 'macos') {
    return data.macos;
  } else if (os == 'linux') {
    return data.linux;
  }
  if (os == 'web') {
    return data.web;
  }

  throw ManUpException('Platform not supported');
}