mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
22 lines
624 B
Dart
22 lines
624 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
abstract class PlatformInfos {
|
|
static bool get isWeb => kIsWeb;
|
|
|
|
static bool get isCupertinoStyle =>
|
|
!kIsWeb && (Platform.isIOS || Platform.isMacOS);
|
|
|
|
static bool get isMobile => !kIsWeb && (Platform.isAndroid || Platform.isIOS);
|
|
|
|
/// For desktops which don't support ChachedNetworkImage yet
|
|
static bool get isBetaDesktop =>
|
|
!kIsWeb && (Platform.isWindows || Platform.isLinux);
|
|
|
|
static bool get isDesktop =>
|
|
!kIsWeb && (Platform.isLinux || Platform.isWindows || Platform.isMacOS);
|
|
|
|
static bool get usesTouchscreen => !isMobile;
|
|
}
|