nodeKeyProperty property
Gets or sets the name of the data property that returns a unique id number or string for each node data object. The value may also be a function taking two arguments, where the first argument will be a node data object. If the second argument is not supplied, the function should return the unique key value; if the second argument is supplied, the function should modify the node data object so that it has that new value as its unique key value. The default value is the name 'key', meaning that it expects the data to have a property named 'key' if it has a key value. The name must not be null or the empty string. You must set this property before assigning the #nodeDataArray.
If you want to set this property you must do so before using the model, and especially before you assign Diagram#model. Note that functions cannot be serialized into JSON-formatted text, so if you are using #toJson and Model.fromJson, and if you want this property to be a function, you will need to assign this property to your desired function immediately after creating the model, including when it is created by Model.fromJson.
Implementation
_i2.Object get nodeKeyProperty => _i4.getProperty(
this,
'nodeKeyProperty',
);
Implementation
set nodeKeyProperty(_i2.Object value) {
_i4.setProperty(
this,
'nodeKeyProperty',
value,
);
}