DiagramPropertyEditor class final

Renders the custom properties whose value type is T in an inspector.

A DiagramProperty.custom declares its value type; the editor for that type builds its control. The field carries the value (or the mixed state of a multi-selection), whether it is enabled or read-only, and writes through the controller: DiagramPropertyField.set for one undoable change and DiagramPropertyField.begin for a preview-then-commit edit such as a drag. After asynchronous work, such as a dialog, pass expectedRevision: field.revision so a stale choice becomes a conflict.

DiagramPropertyEditor.of<Owner>(
  (context, field) => OwnerPicker(
    owner: field.value,
    onChanged: field.set,
  ),
)

Properties

build → Widget Function(BuildContext context, DiagramPropertyField<Object?> field)
Builds the control for a field this editor accepts.
final
hashCode → int
The hash code for this object.
no setterinherited
layout → DiagramPropertyLayout
Where the control sits relative to the property's label.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
valueType → Type
The value type this editor renders.
final

Methods

accepts(DiagramPropertyField<Object?> field) → bool
Whether this editor renders field.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

of<T>(Widget build(BuildContext context, DiagramPropertyField<T> field), {DiagramPropertyLayout layout = DiagramPropertyLayout.row}) → DiagramPropertyEditor
The editor of custom properties of type T, placed by layout.