current property
Platforms
get
current
The current platform the Flutter application us running on.
Implementation
Platforms get current {
if (isTestOverride) {
return Platforms.android;
}
if (isChromeExtension) {
return Platforms.chromeExtension;
}
if (isWeb) {
return Platforms.web;
}
if (isAndroid) {
return Platforms.android;
}
if (isIOS) {
return Platforms.iOS;
}
if (isMacOS) {
return Platforms.macOS;
}
if (isLinux) {
return Platforms.linux;
}
if (isFuschia) {
return Platforms.fuschia;
}
throw 'unsupported platform';
}