NativeBridge class abstract
Platform-agnostic interface to native OS capabilities.
- Implementers
Constructors
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
nullif 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
pathin the system editor, optionally jumping tolineandcolumn. -
openUrl(
String url) → Future< void> -
Open
urlin the default browser. -
registerGlobalHotkey(
String key, List< String> modifiers, void callback()) → void - Register a global hotkey.
-
revealInFinder(
String path) → Future< void> -
Reveal
pathin the platform file manager. -
setClipboard(
String text) → Future< void> -
Write
textto 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
nullif 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