We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb475cf commit 8db2bc9Copy full SHA for 8db2bc9
packages/tray_manager/lib/src/helpers/sandbox.dart
@@ -1,7 +1,9 @@
1
import 'dart:io';
2
3
-/// Returns `true` if the app is running in a sandbox, eg. Flatpak or Snap.
+/// Returns `true` if the app is running in a sandbox, eg. Flatpak, Snap, Docker, Podman.
4
bool runningInSandbox() {
5
return Platform.environment.containsKey('FLATPAK_ID') ||
6
- Platform.environment.containsKey('SNAP');
+ Platform.environment.containsKey('SNAP') ||
7
+ (Platform.environment['container']?.isNotEmpty == true) ||
8
+ FileSystemEntity.isFileSync('/.dockerenv');
9
}
0 commit comments