Unique class Null safety

Unique annotation forces that the value of a property is unique among all objects stored for the given entity.

Trying to put an Object with offending values will result in an exception.

Unique properties are based on an Index, so the same restrictions apply. It is supported to explicitly add the Index annotation to configure the index type.

Constructors

Unique()
Create a Unique annotation.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited