FileKitDialogSettings customizes the file picker, directory picker, gallery picker, and file saver. Each platform has its own constructor, so build custom settings in platform code. FileKitDialogSettings.createDefault() works everywhere.
Settings
String?
default:"null"
JVM
macOS
Linux native
Windows native
Dialog title. macOS shows it as the panel message. Some save dialogs ignore it: see File saver.
FileKitDialogParent?
default:"null"
JVM
Window that owns the dialog, for modality and stacking. See Parent window (JVM).
FileKitMacOSSettings
default:"FileKitMacOSSettings()"
JVM on macOS
Native panel options when a JVM app runs on macOS.
Boolean
default:"true"
macOS native
Shows the New Folder button.
FileKitAssetRepresentationMode
default:"Automatic"
iOS
Photos picker format:
Automatic, Current (avoid transcoding), or Compatible (transcode to a widely supported format, for example when a library can’t decode HEIC).UIViewController?
default:"null"
iOS
View controller that presents the dialog. When
null, the suspend API uses the top-most view controller and Compose launchers use the current LocalUIViewController.iOS
Accepted for parity, currently ignored.
createDefault().
Share settings across platforms
Declare a function incommonMain and implement it per platform:
Parent window (JVM)
Inside a Compose DesktopWindow, the WindowScope versions of rememberFilePickerLauncher, rememberDirectoryPickerLauncher, and rememberFileSaverLauncher parent the dialog to that window, replacing any parent in your settings.
Elsewhere, pass the parent yourself:
jvmMain
FileKitDialogParent also has windows(hwnd), x11(xid), and wayland(exportedHandle) factories for non-AWT windows. FileKit borrows the parent: keep the window alive until the dialog call returns. Invalid factory arguments and a parent the active dialog can’t use both throw IllegalArgumentException.
Supported parents per JVM dialog
Supported parents per JVM dialog
Wayland handles
Wayland handles
wayland() takes the unprefixed opaque handle exported through xdg_foreign. FileKit adds the wayland: portal prefix without normalizing the value. A raw wl_surface*, a Tao handle, or a string built from a pointer is not an exported Wayland handle. Empty handles and handles containing NUL are rejected.Nucleus with the Tao backend
Nucleus with the Tao backend
Nucleus 2.3.2 exposes the native identities needed to parent dialogs on Windows and Linux/X11. Convert the window yourself and pass the settings to a plain (non-Don’t pass
WindowScope) launcher:jvmMain
nucleusWindow.unsafe.taoHandle: it identifies the Tao event loop, not an operating-system window. On Wayland, x11WindowId is null, so this adapter opens an unparented dialog. The dialog is also unparented until the Nucleus window exposes a supported identity.Other settings classes
Upgrading from older versions
Upgrading from older versions
FileKit 0.15 replaced the JVM
parentWindow property. Replace FileKitDialogSettings(parentWindow = window) with FileKitDialogSettings(parent = FileKitDialogParent.awt(window)). There is no compatibility property or constructor.