mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
Windows and Linux open databases through sqflite_common_ffi with the bundled SQLite; macOS keeps sqflite_darwin. Desktop databases live in the application support directory. Downloads default to <Music>/Mornye, and setup and the Files settings pick plain folders without permission, SAF or bookmark steps.
14 lines
527 B
Dart
14 lines
527 B
Dart
import 'dart:io' show Platform;
|
|
|
|
/// Overrides [isDesktopPlatform] in tests.
|
|
bool? debugDesktopPlatformOverride;
|
|
|
|
// `flutter test` runs on a desktop host; tests see a mobile app unless they
|
|
// opt in through [debugDesktopPlatformOverride].
|
|
final bool _hostIsDesktop =
|
|
!Platform.environment.containsKey('FLUTTER_TEST') &&
|
|
(Platform.isMacOS || Platform.isWindows || Platform.isLinux);
|
|
|
|
/// True in Windows, Linux and macOS builds of the app.
|
|
bool get isDesktopPlatform => debugDesktopPlatformOverride ?? _hostIsDesktop;
|