mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
11 lines
427 B
Dart
11 lines
427 B
Dart
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);
|
|
final isAndroid = !kIsWeb && Platform.isAndroid;
|
|
final isDesktop =
|
|
!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows);
|
|
final isUnitTest = !kIsWeb && Platform.environment.containsKey("FLUTTER_TEST");
|