Files
zarzet 6aeed936b4 feat(desktop): use plain folders and SQLite FFI on desktop
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.
2026-10-20 13:44:25 +07:00

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;