flutter_device_apps_macos 0.1.0
flutter_device_apps_macos: ^0.1.0 copied to clipboard
Independent macOS app discovery and management APIs for Flutter.
flutter_device_apps_macos #
Independent macOS app discovery and management plugin for Flutter.
Requires macOS 12+, Flutter 3.44+, and Dart 3.12+. Swift Package Manager and CocoaPods are supported.
List apps #
import 'package:flutter_device_apps_macos/flutter_device_apps_macos.dart';
final List<MacosAppInfo> apps = await FlutterDeviceAppsMacos.listApps(
includeSystem: false,
onlyLaunchable: true,
includeIcons: false,
bundleIdentifierPrefix: null, // Optional: 'com.apple.'.
bundleIdentifierContains: null, // Optional: 'Safari'.
);
- Scans
/Applications,~/Applications,/System/Applications, and/System/Library/CoreServices, including non-package subdirectories. - Filters are case-sensitive and combined with AND;
nullor''disables each. - Returns
[]when no apps match. Different paths with the same bundle ID remain separate. - Icons are optional 64×64 PNG bytes; use
Image.memory(app.iconBytes!)to display them. isSystemis a location heuristic.onlyLaunchableexcludes agents, background-only apps, and apps without an executable; launch success is not guaranteed.- App Sandbox and file access can limit discovery. Unreadable bundles are skipped;
ERR_LISTis thrown if all existing search directories are inaccessible.
Call WidgetsFlutterBinding.ensureInitialized() when querying before runApp().
Calls from initState() and UI callbacks need no extra initialization.
See TODO for planned APIs and API capabilities for discovery behavior and limitations.
Development #
flutter pub get
flutter analyze
cd example
flutter run -d macos
License #
MIT © 2026 okmsbun