linkKeyProperty property
Gets or sets the name of the data property that returns a unique id number or string for each link data object. The value may also be a function taking two arguments, where the first argument will be a link data object. If the second argument is not supplied, the function should return the unique string or number key for that link data object; if the second argument is supplied, the function should modify the link data object so that it has that string or number as the unique key for that link. The default value is the empty string, which means the model will not maintain a key property value on link data objects. The name must not be null.
When this property has a value of an empty string (the default value), #getKeyForLinkData will return undefined, and #findLinkDataForKey will always return null.
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 linkKeyProperty => _i4.getProperty(
this,
'linkKeyProperty',
);
Implementation
set linkKeyProperty(_i2.Object value) {
_i4.setProperty(
this,
'linkKeyProperty',
value,
);
}