parseToPlatform method
Implementation
Platform parseToPlatform() {
switch (toLowerCase().trim()) {
case 'ios':
return Platform.ios;
case 'android':
return Platform.android;
case 'macos':
return Platform.macos;
case 'windows':
return Platform.windows;
case 'linux':
return Platform.linux;
case 'fuchsia':
return Platform.fuchsia;
default:
throw FormatException('$this is not a valid platform name');
}
}