EditorBase<T> class

Base class for all property editors.

Subclasses override getWidget to return a type-specific editing widget (e.g. a text field, checkbox, or slider). The default implementation renders the property value as a read-only Text widget.

When multiple owners are provided, the base implementation compares their values and shows an empty string when they differ — indicating a mixed-value state.

To implement a custom editor, extend this class and override getWidget:

class MyEditor extends EditorBase<MyType> {
  MyEditor({super.key, required super.owners, required super.propertyName,
             super.customData, super.onUpdatedProperty});

  @override
  Widget getWidget(BuildContext context) => MyEditorWidget(...);
}
Implementers

Constructors

EditorBase({Key? key, required List<Inspectable> owners, required String propertyName, Object? customData, void onUpdatedProperty(dynamic value)?})
Creates an EditorBase.
const

Properties

customData Object?
Arbitrary data forwarded to InspectableProperty.setValue on each edit.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Optional key applied to the widget returned by getWidget.
final
onUpdatedProperty → void Function(dynamic value)?
Called after the property value has been successfully updated.
final
owners List<Inspectable>
The Inspectable objects whose property is being edited.
final
propertyName String
The name of the property to edit.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getWidget(BuildContext context) Widget
Returns the Flutter widget used to display and edit this property.
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 Properties

name String
Identifier for this editor type.
no setter