currentPlatform property
String
get
currentPlatform
Implementation
String get currentPlatform {
if (_platformOverride.isNotEmpty) return _platformOverride.toLowerCase();
if (kIsWeb) return 'web';
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return 'android';
case TargetPlatform.iOS:
return 'ios';
case TargetPlatform.windows:
return 'windows';
case TargetPlatform.linux:
return 'linux';
case TargetPlatform.macOS:
return 'macos';
case TargetPlatform.fuchsia:
return 'fuchsia';
}
}