DataSet<Model extends DataClass> class

Inheritance
Implemented types

Constructors

DataSet(Model instance, {required String route, String? origin})

Properties

data ↔ Model?
This object stores typed data fetched by a data provider or setted by other source
getter/setter pairoverride
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
list List<Model>
This list stores data fetched by a data provider or setted by other source
getter/setter pairoverride
loadStatus ValueNotifier<LoadStatus>
getter/setter pairoverride-getter
local Map<String, dynamic>
This property stores whichever type of object. We recommend using it for storing functions that return a different perspective of the list property
getter/setter pairoverride
localViews Map<String, dynamic>
This property stores whichever views from the main list. We recommend using it for storing functions that return a different perspective of the list property
getter/setter pairoverride
route String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalRecords int
Total records available in the remote server;
getter/setter pair

Methods

add([Model? model]) Future<void>
override
addChild<T extends DataClass>(String relationName, T instance, String routeTemplate) DataSet<Model>
This method registers a DataSet that will have direct relation to the dataset already instantiated. For that, it uses a relation name as a key for retrieving it later
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearList() → void
Clears all data from the list and notifies listeners
clearModel() → void
Clears the model and notifies listeners
create(Model? model) → void
override
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
get({Map<String, dynamic> filters = const {}, bool cache = true}) Future<List<Model>>
override
getOne(dynamic uniqueID) Future<Model>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
rel<T extends DataClass>(String relationName, {dynamic parentId, bool clear = true}) DataSet<T>
Returns the dataset that was stored as a child under the relation name passed as parameter
remove(dynamic uniqueID) Future<void>
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replicate() DataSet<Model>
toString() String
A string representation of this object.
inherited
update(dynamic uniqueID, [Model? model]) Future<void>
override
updateRoute(String newRoute) → void

Operators

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

Static Methods

of<T extends DataClass>() DataSet<T>