nc-photos/app/lib/platform/k.dart

12 lines
427 B
Dart
Raw Normal View History

2021-04-29 17:42:44 +02:00
import 'dart:io';
import 'package:flutter/foundation.dart';
const isWeb = kIsWeb;
// Platform n/a on web, need checking kIsWeb first
final isMobile = !kIsWeb && (Platform.isAndroid || Platform.isIOS);
2021-04-29 17:42:44 +02:00
final isAndroid = !kIsWeb && Platform.isAndroid;
final isDesktop =
!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows);
final isUnitTest = !kIsWeb && Platform.environment.containsKey("FLUTTER_TEST");