You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/lib/pangea/utils/platform_name.dart

42 lines
762 B
Dart

import 'dart:io' show Platform;
import 'package:flutter/foundation.dart' show kIsWeb, kDebugMode;
class MyPlatformName {
static String get platformName {
if (kIsWeb) {
return 'web';
}
if (Platform.isAndroid) {
return 'android';
}
if (Platform.isIOS) {
return 'ios';
}
if (Platform.isFuchsia) {
return 'fuchsia';
}
if (Platform.isLinux) {
return 'linux';
}
if (Platform.isMacOS) {
return 'macos';
}
if (Platform.isWindows) {
return 'windows';
}
return 'unknownplatform';
}
static String get getPlatformWithModeName {
String mode = 'Release';
if (kDebugMode) {
mode = 'Debug';
}
return MyPlatformName.platformName + mode;
}
}