floating_palette_advanced library

Floating Palette - Advanced API for power users.

This library exports the full API including:

  • Native bridge for direct method channel access
  • Individual service clients
  • FFI for synchronous native calls
  • Testing utilities

When to use this

Use this library when you need:

  • Direct access to service clients (WindowClient, FrameClient, etc.)
  • Custom native bridge implementations
  • FFI for synchronous operations
  • Mock bridge for testing

Simple API

For most use cases, import floating_palette.dart instead.

Classes

ActiveAppInfo
Information about the active (frontmost) application window.
AnimatedGradientBorder
An animated gradient border that flows around its child like LED strips.
AnimationClient
Client for AnimationService.
AppearanceClient
Client for AppearanceService.
AutoSnapConfig
Per-palette auto-snap configuration.
BackgroundCaptureClient
Client for BackgroundCaptureService.
BackgroundCaptureConfig
Configuration for background capture.
BackgroundCaptureEvent
Event data for background capture events.
Capabilities
Platform capabilities detected at runtime.
CapabilityGuard
Guards against using unsupported platform features.
FocusClient
Client for FocusService.
FocusedEntity
Represents the entity that currently has keyboard focus.
FrameClient
Client for FrameService.
GlassEffectService
High-level service for applying glass blur effects to palette windows.
GlassPathBridge
Low-level FFI bridge for writing path data to native glass mask.
GradientBorder
Configuration for an animated gradient border around a palette.
HostFocused
The host application has focus.
InputBehavior
Input handling configuration for a palette.
InputClient
Client for InputService.
InputManager
Orchestrates keyboard input routing between host app and palettes.
MessageClient
Client for receiving untyped messages from palettes.
MockNativeBridge
A mock NativeBridge for testing.
NativeBridge
Single bridge to native layer.
NativeCommand
A command sent to the native layer.
NativeEvent
An event received from the native layer.
NativeRect
A simple rectangle with position and size for FFI operations.
Palette
Simplified static API for palette-side operations.
PaletteAnimation
Animation configuration for palette show/hide transitions.
PaletteAppearance
Visual appearance configuration for a palette.
PaletteArgs
Base class for palette arguments.
PaletteArgsProvider<T extends PaletteArgs>
Provides access to palette args within a palette widget.
PaletteBackgroundCapture
A widget that captures the desktop background behind a palette window and provides it as a texture for use with liquid glass effects.
PaletteBehavior
Behavior configuration for a palette.
PaletteBorder
A decorative border wrapper for palette content.
PaletteBorderController
Controller for imperatively controlling a PaletteBorder.
PaletteConfig
Complete configuration for a palette.
PaletteContext
Provides access to the current palette from within a palette widget.
PaletteController<TArgs>
Controller for a single palette window.
PaletteEvent
Base class for palette events.
PaletteFocused
A specific palette has focus.
PaletteGroup
Defines a group of palettes where at most one can be visible at a time.
PaletteHost
Central dependency injection container for floating palettes.
PaletteIdentifiable
Interface for objects that have a palette ID. Implemented by PaletteController.
PaletteKeyboard
Keyboard handling configuration for a palette.
PaletteKeyEvent
Key event data received from native.
PaletteKeyReceiver
Provides access to key events routed to this palette.
PaletteMessage
Message event from a palette.
PaletteMessenger
Messenger for palette-to-host communication.
PalettePosition
Position configuration for a palette.
PaletteRegistry
Registry for palette entry points.
PaletteScaffold
A scaffold widget for palette content.
PaletteSelf
Query methods for a palette to get information about itself.
PaletteSize
Size configuration for a palette.
PaletteSizeConfig
Size configuration for a palette, queryable at runtime.
PaletteTestHost
Test helper for isolated palette testing.
PaletteWindow
Utility for palettes to control their own window.
Point
A simple point with x and y coordinates.
PropertyAnimation
A single property animation spec.
Protocol
Protocol versioning and compatibility checking.
ScreenClient
Client for ScreenService.
ScreenInfo
Information about a screen/monitor.
ScreenRect
A rectangle in screen coordinates with anchor point helpers.
ServiceClient
Base class for service clients.
SizeReporter
A widget that reports its size to native and resizes the window.
SnapClient
Client for SnapService.
SnapConfig
Configuration for snap behavior.
SnapDetached
Emitted when a snap binding is removed.
SnapDragEnded
Emitted when user releases a dragged snapped follower.
SnapDragging
Emitted during dragging of a snapped follower (throttled).
SnapDragStarted
Emitted when user starts dragging a snapped follower.
SnapEvent
Base class for snap-related events from native.
SnapProximityEntered
Emitted when a dragged palette enters a snap zone of another palette.
SnapProximityExited
Emitted when a dragged palette exits a snap zone.
SnapProximityUpdated
Emitted during drag while in snap proximity (distance changes).
SnapSnapped
Emitted when a follower is snapped to a target.
SyncNativeBridge
High-level Dart API for synchronous FFI calls.
TextCursorTracker
Tracks text cursor (caret) position in a TextField or similar widget.
TransformClient
Client for TransformService.
VisibilityClient
Client for VisibilityService.
WidgetPosition
Utility for finding widget positions in screen coordinates.
WindowClient
Client for WindowService.
ZOrderClient
Client for ZOrderService.

Enums

Anchor
How the palette anchors to its target.
AnimatableProperty
Animatable properties.
BackgroundCapturePermission
Permission status for screen recording.
ClickOutsideBehavior
Behavior when user clicks outside the palette.
CursorAnchor
Anchor points on the cursor rect.
FocusPolicy
How focus is handled when showing a palette.
FocusRestoreMode
What happens to focus when a palette is hidden.
GlassAnimationCurve
Animation curve types for native glass interpolation. Must match native GlassAnimationCurve enum.
GlassMaterial
Material types for the glass blur effect.
GlassPathCommand
Path commands matching native enum GlassPathCommand. Used to build arbitrary paths for glass mask effect.
PaletteLifecycle
When the palette's Flutter view is created.
PalettePreset
Pre-configured palette types for common use cases.
PaletteShadow
Shadow presets for palettes.
PinLevel
Pin levels for windows.
ShakeDecay
Shake decay style.
ShakeDirection
Shake direction for visual feedback.
SnapAlignment
Alignment along the snapped edge.
SnapEdge
Which edge of the window to snap.
SnapMode
Mode for snap relationships.
SnapOnTargetDestroyed
Behavior when target is destroyed.
SnapOnTargetHidden
Behavior when target is hidden.
Target
What the palette positions relative to.
UnsupportedBehavior
How to handle unsupported platform features.

Mixins

PalettePositionMixin<T extends StatefulWidget>
Mixin for StatefulWidget that need to report positions to host.

Extensions

PaletteArgsContext on BuildContext
Extension for convenient args access.
PalettePresetConfig on PalettePreset
Extension to get PaletteConfig from a preset.
RectToScreenRect on Rect
Extension on Rect for quick conversion to ScreenRect.
ScreenOffset on Offset
Extension on Offset for platform-aware directional offsets.
TextSelectionBounds on TextCursorTracker
Extension to add selection bounds support to TextCursorTracker.

Functions

initPaletteEngine(Map<String, Widget Function()> builders, {void registerEvents()?}) → void
Initialize palette engine with generated builders.
runPalette(String name) → void
Run a palette entry point.
runPaletteApp(String windowId, Widget child) → void
Run a palette with a direct widget.

Typedefs

EventCallback<T extends PaletteEvent> = void Function(T event)
Callback for receiving typed events from host.
MessageCallback = void Function(String type, Map<String, dynamic> data)
Callback for receiving untyped messages from host.
NativeEventCallback = void Function(NativeEvent event)
Callback for native events.
PaletteMessageCallback<T> = void Function(T message)
PaletteVoidCallback = void Function()
Callback types for palette events.

Exceptions / Errors

NativeBridgeException
Exception thrown when a native command fails.
ProtocolMismatchError
Protocol version mismatch error.
TestFailure
Exception thrown when test verification fails.
UnknownEventError
Exception thrown when deserializing an unknown event type.