Relationship<E extends DataModel<E>, N> class abstract

A Set that models a relationship between one or more DataModel objects and their a DataModel owner. Backed by a GraphNotifier.

Implementers

Constructors

Relationship([Set<E>? models])

Properties

first → E?
no setter
hashCode int
The hash code for this object.
no setterinherited
ids Set<String>
no setter
internalType String
no setter
isEmpty bool
no setter
isInitialized bool
getter/setter pair
isNotEmpty bool
no setter
keys Set<String>
Returns keys as Set in relationship if initialized, otherwise an empty set
no setter
length int
no setter
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

add(E value, {bool notify = true}) bool
Add a value to this Relationship
contains(Object element) bool
dispose() → void
initialize({required Map<String, RemoteAdapter<DataModel>> adapters, required DataModel<DataModel> owner, required String name, String? inverseName}) Future<Relationship<E, N>>
Initializes this relationship (typically when initializing the owner in DataModel) by supplying the owner, and related adapters and metadata.
map<T>(T f(E)) Iterable<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Object value, {bool notify = true}) bool
Removes a value from this Relationship
toJson() → dynamic
This is used to make json_serializable's explicitToJson transparent.
toList() List<E>
toSet() Set<E>
toString() String
A string representation of this object.
override
watch() DelayedStateNotifier<N>
where(bool test(E)) Iterable<E>

Operators

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