EntityKindHints class final
What an editor shows for one entity type: its name in the palette, its colour, its own fields, and the components an entity of it carries.
Keyed by type, the level format's word (boat), not namespaced:
a type is read by every genre that speaks it, as EntityKinds keys its
kinds.
Constructors
-
EntityKindHints({required String type, String? label, LinearColor? tint, List<
FieldHint> fields = const <FieldHint>[], Set<String> components = const <String>{}}) -
const
Properties
-
components
→ Set<
String> -
The ids of the ComponentHints an entity of this type shows besides
those that name the type themselves.
final
-
defaults
→ Map<
String, Object?> -
The properties a newly placed one starts with: every field's default.
no setter
-
fields
→ List<
FieldHint> -
Its own properties, in the order the inspector lists them; their
defaults are what a placed one starts with.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String?
-
What a palette row and an inspector heading say, or null for type.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tint → LinearColor?
-
The colour its mark is drawn in, or null for the one the type's name
picks.
final
- title → String
-
What the inspector heading says.
no setter
- type → String
-
The entity type.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - As a document writes it.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? json) → EntityKindHints -
What
jsonholds, as toJson writes it. Throws a DocumentFormatException for anything else.