editor_ui library

Shared presentation controls for document editors. Hosts own persisted values, validation, font resources and undo transactions.

Classes

EditorColorDialog
A draft-only single or paired color editor. Cancel returns null; hosts decide whether and how to restore any optional live preview.
EditorColorDialogTheme
Host-owned dialog shell, captured by Flutter when opening a dialog route.
EditorColorResult
EditorColorSwatch
EditorColorValue
RGB plus unquantized opacity. Only RGBA serialization rounds alpha to a byte.
EditorDialogDismissal
Route-scoped Escape dismissal shared by document editors and host dialogs.
EditorFieldHistory
Keep native undo while a value is being typed; otherwise undo the document.
EditorFontOption
EditorFontPicker
Catalog-free font selection. The host callback owns loading and persistence.
EditorNumberScroll
Wheel stepping for a focused numeric TextField or TextFormField.
EditorTextAlignmentControl
EditorTextStyleControl
Shared B/I/U control. Hosts own the document and available font faces.

Functions

editorArtworkSuggestions(Uint8List rgba) → List<String>
Keep representative artwork colors, then add color-wheel harmonies. Neutrals have no meaningful hue, so never invent colorful suggestions for them.
editorImagePalette(Uint8List rgba, {int limit = 5}) → List<String>
Representative artwork colors, ordered by coverage and perceptual diversity. Transparent pixels and tiny isolated details do not compete with the artwork.
showEditorDialog<T>({required BuildContext context, required WidgetBuilder builder, Color? barrierColor}) → Future<T?>
All editor modal entry points share route-scoped Escape, even when a replaced/disabled control leaves keyboard focus behind the modal.