fromString static method
Get platform from string input
Implementation
static Platform? fromString(String input) {
switch (input.toLowerCase()) {
case 'ios':
return Platform.ios;
case 'android':
return Platform.android;
case 'web':
return Platform.web;
case 'macos':
return Platform.macos;
case 'windows':
return Platform.windows;
case 'linux':
return Platform.linux;
default:
return null;
}
}