Collection<T extends Model> class abstract

Collection class contains Models and handles them

Implementers

Constructors

Collection(String _id)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<bool>
createModel(Map<String, dynamic> modelData) → T?
Create new Model from Data
getCacheId() String
Returns Cache Id for this Collection
getId() String
Returns Collection Id
getModelByFieldValue(String key, dynamic value) → T?
Returns Model With Specific Value
getModelById(String id) → T?
Returns Model by Id
getModels() Map<String, T>
Return Models In Collection
getModelsAsList({int? max, int start = 0}) List<T>
Return Models as List
hasModel(String id) bool
Collection contains Model with id
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeModelById(String id) Future<bool>
saveModel(Model model) Future<bool>
Save Model to Cache and add to Map
saveModels(List<Model> models, {bool breakOnError = false}) Future<void>
Save Models to Cache and add to Map
setModels(Map<String, T> models) → void
setup() Future<bool>
Initialize your Model Data Here
toString() String
A string representation of this object.
inherited

Operators

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