skipEntitlementsChecks static method
Skips the macOS App Sandbox entitlement checks performed before showing a dialog.
Only relevant for non-sandboxed macOS apps, which do not declare the
com.apple.security.files.user-selected.read-only/read-write entitlements
and would otherwise be incorrectly blocked by those checks. Call this before
any other file picking method.
Delegates to FilePickerPlatform.instance.skipEntitlementsChecks(),
whose default implementation is a no-op. Only FilePickerDarwin
overrides it, and only macOS performs the check in the first place, so
this method does nothing on platforms other than macOS.
Note: skipping entitlement checks may lead to unexpected behavior if the app is actually sandboxed. Use with caution.
Implementation
static Future<void> skipEntitlementsChecks() async {
await FilePickerPlatform.instance.skipEntitlementsChecks();
}