fix: Use single-isolate push

This commit is contained in:
Sorunome 2021-02-07 17:18:38 +01:00
commit 353b1c8378
18 changed files with 1051 additions and 599 deletions

View file

@ -11,21 +11,26 @@ import '../app_config.dart';
abstract class PlatformInfos {
static bool get isWeb => kIsWeb;
static bool get isLinux => !kIsWeb && Platform.isLinux;
static bool get isWindows => !kIsWeb && Platform.isWindows;
static bool get isMacOS => !kIsWeb && Platform.isMacOS;
static bool get isIOS => !kIsWeb && Platform.isIOS;
static bool get isAndroid => !kIsWeb && Platform.isAndroid;
static bool get isCupertinoStyle =>
!kIsWeb && (Platform.isIOS || Platform.isMacOS);
static bool get isCupertinoStyle => isIOS || isMacOS;
static bool get isMobile => !kIsWeb && (Platform.isAndroid || Platform.isIOS);
static bool get isMobile => isAndroid || isIOS;
/// For desktops which don't support ChachedNetworkImage yet
static bool get isBetaDesktop =>
!kIsWeb && (Platform.isWindows || Platform.isLinux);
static bool get isBetaDesktop => isWindows || isLinux;
static bool get isDesktop =>
!kIsWeb && (Platform.isLinux || Platform.isWindows || Platform.isMacOS);
static bool get isDesktop => isLinux || isWindows || isMacOS;
static bool get usesTouchscreen => !isMobile;
static String get clientName =>
'${AppConfig.applicationName} ${isWeb ? 'Web' : Platform.operatingSystem}';
static Future<String> getVersion() async {
var version = kIsWeb ? 'Web' : 'Unknown';
try {