toPlatform method

Platform toPlatform()

Implementation

Platform toPlatform() {
  switch (this) {
    case 'OSX':
      return Platform.osx;
    case 'WINDOWS':
      return Platform.windows;
    case 'LINUX':
      return Platform.linux;
    case 'OBJC':
      return Platform.objc;
    case 'SWIFT':
      return Platform.swift;
    case 'ANDROID':
      return Platform.android;
    case 'JAVASCRIPT':
      return Platform.javascript;
  }
  throw Exception('$this is not known in enum Platform');
}