NativeBridge class abstract

Platform-agnostic interface to native OS capabilities.

Implementers

Constructors

NativeBridge()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

executeDetached(String command, List<String> args) Future<void>
Launch a detached process (fire-and-forget).
getCapabilities() NativeCapabilities
What this platform supports.
getClipboard() Future<String?>
Read the current clipboard text, or null if unavailable.
getEnvironmentVariable(String name) String?
Read an environment variable.
getPlatform() NativePlatform
Detect the current platform.
getSystemInfo() Future<SystemInfo>
Gather system information.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openInEditor(String path, {int? line, int? column}) Future<void>
Open path in the system editor, optionally jumping to line and column.
openUrl(String url) Future<void>
Open url in the default browser.
registerGlobalHotkey(String key, List<String> modifiers, void callback()) → void
Register a global hotkey.
revealInFinder(String path) Future<void>
Reveal path in the platform file manager.
setClipboard(String text) Future<void>
Write text to the system clipboard.
showFileDialog({String? title, List<String>? filters, bool multiple = false, bool directory = false}) Future<List<String>?>
Show an open-file dialog. Returns selected paths or null if cancelled.
showNativeNotification(String title, String body, {String? icon, bool sound = false}) Future<void>
Show a native OS notification.
showSaveDialog({String? title, String? defaultName, List<String>? filters}) Future<String?>
Show a save-file dialog. Returns the chosen path or null.
toString() String
A string representation of this object.
inherited
unregisterGlobalHotkey(String key) → void
Unregister a previously registered global hotkey.

Operators

operator ==(Object other) bool
The equality operator.
inherited