kit library

The editor's UI kit alone — buttons, fields, controls, dialogs, dropdowns (EditorDropdown), menus (showEditorMenu), scroll bars (EditorScrollbar), number fields to drag (ScrubbableNumberField), the snackbar (EditorSnackBarController), the theme and its metrics — for tools that draw like the editor.

Classes

CommitTextField
A text field that keeps what was typed when Enter is pressed or when it loses the focus — Tab, a click anywhere else — the one rule every typed field in the editor follows, and shows a value changed from outside, an undo say, whenever it is not being typed in. Esc puts back what was there and leaves the field.
EditorAlert
A small dialog in the editor's look: a title, what it is about, and the buttons — the one to press last and filled.
EditorBadge
A small status pill: tinted with its accent rather than filled with it.
EditorButton
A button with words on it, in the editor's colours whatever the ambient Material theme is.
EditorCard
A raised, bordered block of related things.
EditorChip
A filter or a switch that says how many things it would show: Errors 3. Lit while selected.
EditorChoice<T>
What the menu pops with. A wrapper, because a popup treats a null result as "dismissed" and a dropdown's value may legitimately be null-like.
EditorDialogFrame
The frame the editor's big dialogs share — the sprite editor, the interface and tileset editors, the settings: the editor dimmed behind, and the dialog over it with room to spare at the edges, so opening one does not feel like leaving.
EditorDivider
A hairline between regions.
EditorDropdown<T>
The editor's dropdown: a field the same height as the text and number fields beside it, opening a compact list directly below.
EditorDropdownOption<T>
One choice in an EditorDropdown.
EditorEmptyState
What a panel shows when it has nothing to show, and what to do about it.
EditorIconButton
A small square icon button — the editor's one.
EditorKeyClaim
Keys a focused panel keeps for itself, ahead of the editor's shortcuts.
EditorLook
The editor's ambient look for what is under it: its text at the size and weight the settings ask for, motion as they allow, and one style of tooltip.
EditorMessenger
Wraps the editor overlay and provides EditorSnackBarController to the subtree; EditorSnackBarLayer draws what it holds.
EditorMetrics
The editor's sizes as the settings make them: radii from the corner radius, gaps from the density, durations from the animation speed — and the accessibility settings over all of them: bigger targets, no motion, longer timings.
EditorScrollbar
A scroll bar that is always there when a list holds more than it shows.
EditorSearchField
A compact search box. onChanged fires as the text changes; the clear button empties it.
EditorSectionHeader
The uppercase caption over a group: LAYERS, MODULES.
EditorSegmented<T>
One of a few: the choices side by side, the picked one lit. Narrower than its labels, the choices share what there is.
EditorSlider
A continuous value: a slider to drag, and the number beside it to type.
EditorSnack
One snackbar that has been shown and not yet dismissed, with what it has heard from its task so far. Each keeps its own subscription and timer, so showing or minimising another never cuts its task off.
EditorSnackBarController
The snackbars of one editor: shows, minimises and dismisses them.
EditorSnackBarEntry
Data object describing a snackbar to show.
EditorSnackBarLayer
The snackbars showing, stacked newest at the bottom. Drop it in a Stack, positioned against the corner of the canvas it should sit in.
EditorSnackBarStep
A single step update emitted into an EditorSnackBarEntry.progressStream.
EditorSwatches
Round colour swatches, the picked one ringed.
EditorTheme
The editor's colours by name, each read from the palette the overlay last applied (current).
EditorThemeData
The editor's palette as a value, so it can change while the editor runs.
EditorToggle
On or off: a small switch that takes the keyboard like a button.
EditorToolbar
A row of controls along the top of a dock, a panel or a dialog.
EditorToolButton
A toolbar's tool: bigger than an icon button, with the key that picks it in its corner — because the keys are what anyone doing this repeatedly will use; the buttons are for finding them. The tool in hand is filled and has a bar down its left edge.
FocusOutline
An accent ring around child while something in it has the keyboard.
GizmoModeSettings
The gizmos of one GizmoMode: shown or not, and the kinds turned off within it.
GizmoSettings
The gizmos of every GizmoMode, each its own.
KeyCap
A key as it is printed on a keycap: Ctrl+Shift+Z.
MinimizedSnacksChip
The status strip's word on minimised snackbars: the latest one's title, how many there are, and a click to bring them back.
NumberScrubConfig
Drag-to-scrub configuration for numeric inspector fields: how far a drag moves the value, how it is written, and the limits it is kept within.
OverlayUiSettings
The editor's own preferences: how its chrome looks, how it can be made easier to use, how the viewport draws and snaps, how scenes are kept safe, and the keys that run its commands. Persisted by the settings store; modules keep theirs as SettingPrefs beside it.
PendingFieldEdits
The typed fields that have the keyboard, and what each keeps.
ScrubbableNumberField
A number box whose label is its drag handle: drag the label sideways to scrub the value by the config's step, or type a number and keep it with Enter, Tab or a click elsewhere. Esc, with a change typed, puts back what was there; text that is not a finite number is refused the same way.
SettingRange
A setting's allowed range, for the dialog's slider and for clamping a stored or imported value as it is read.
ThemePreset
A named palette the settings dialog offers.
ThrottledSignalConsumer
builder, built again when any of signals change, and when often changes — that one at most every every while it keeps changing: the first change after a still moment at once, the last one always.
WorkspaceHeader
The bar along the top of a workspace: what it is and what file it has open, whether that is saved, Save, Undo and Redo — then the workspace's own tools, and on the right full screen and close.
WorkspaceKeyScope
Where a workspace's keys arrive.

Enums

AutosaveMode
What the autosave does with a scene that has changed.
ClosePrompt
When closing a scene asks first.
EditorButtonKind
What a text button is for.
EditorSnackBarType
What kind of message a snackbar gives: its colour and icon, and whether the Messages setting lets it show (EditorSnackBarController.shows). One that follows a task shows whatever its type.
GizmoKind
A kind of gizmo, turned off or on by itself: right-click the Gizmos button.
GizmoMode
Where the editor is, for what it draws over the level: each place keeps its own gizmos, shown or hidden, and its own kinds turned off.
MessageLevel
Which messages show over the editor.
OverlayDensity
How tightly the editor's chrome is packed: the three steps the settings dialog offers for OverlayUiSettings.compactness.
UnsavedChoice
What to do with work that has not been saved.

Extensions

EditorSnackBarTypeX on EditorSnackBarType
The look of an EditorSnackBarType.
OverlayDensityX on OverlayDensity
What the settings dialog shows for an OverlayDensity, and the compactness it stands for.

Functions

askToRecover(BuildContext context, {required String title, String? message}) → Future<bool?>
Offers work that was never saved — an autosaved backup: Recover (true), Open saved (false), or Cancel — which is null, and decides nothing.
askToSaveChanges(BuildContext context, {required String title, String? message}) → Future<UnsavedChoice?>
Asks whether to save before something that would lose unsaved work: Save, Don't save, or Cancel — which is null.
editorFieldDecoration({String? hint, Widget? prefixIcon, Widget? suffixIcon, EdgeInsetsGeometry? contentPadding, String? suffixText}) → InputDecoration
The decoration every small field in the editor shares: a dark fill, a line that shows, the accent when it has the keyboard.
editorMenuDivider() → PopupMenuDivider
The rule between groups of items.
editorMenuHeading<T>(String label) → PopupMenuItem<T>
A group's name, above the things in it. Not something to choose.
editorMenuItem<T>(T value, String label, {bool enabled = true, Color? color, double height = 30, IconData? icon, Color? iconColor, String? shortcut, bool iconSlot = false}) → PopupMenuItem<T>
One line of a menu.
isEscapeDown(KeyEvent event) → bool
Whether event is Esc going down: what puts a field's value back.
mayLeaveUnsaved(BuildContext context, {required bool dirty, required Future<bool> save(), String title = 'Save your changes?', String? message}) → Future<bool>
Asks what to do with unsaved work before leaving it, and does it.
openEditorDropdownMenu<T>(BuildContext anchor, {required List<EditorDropdownOption<T>> options, T? selected, bool searchable = false, T customValue(String typed)?, String customLabel(String typed)?, double fontSize = 11, double? width, double gap = 0}) → Future<EditorChoice<T>?>
Opens an EditorDropdown's list below whatever anchor is the context of — for a button that is not a dropdown field but offers the same list: a "⋮" menu's "Add tag…". Null when it was dismissed.
showEditorConfirm(BuildContext context, {required String title, required String message, required String confirmLabel, bool danger = true}) → Future<bool>
Asks before something that cannot be taken back. True when the user went ahead.
showEditorMenu<T>(BuildContext context, Offset at, List<PopupMenuEntry<T>> items) → Future<T?>
Opens items at the global point at, in the editor's colours.
showEditorMenuBelow<T>(BuildContext anchor, List<PopupMenuEntry<T>> items, {double gap = 4}) → Future<T?>
Opens items gap below the widget anchor is the context of: from its left edge, or — where there is no room to the right — its right edge, so a menu from a button at the end of a row opens inward instead of pressed against the header and the window's edge.
tooltipWithShortcut(String tooltip, String? shortcut) → String
Label (Ctrl+S): a tooltip with the key that does the same, when there is one.

Typedefs

ScrollableBuilder = Widget Function(BuildContext context, ScrollController controller)
Builds a scrollable around controller.