MetadataMixin mixin
A mixin that provides a simple way to add metadata to a class.
- Mixin applications
Properties
Methods
-
clearMeta(
) → void - Clears all metadata entries.
-
getMeta<
T> ({Object? key, T orElse()?}) → T -
Returns the metadata entry for the given key or type argument.
If no metadata entry is found, throws an exception or automatically
calls the
orElsefunction to initialize the metadata entry and return it. -
getMetaOrNull<
T> ([Object? key]) → T? - Returns the metadata entry for the given key or type argument. If no metadata entry is found, returns null.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMeta<
T> (T value, {Object? key}) → void - Sets the metadata entry for the given key or type argument.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited