Provider<TModel extends Model> class abstract

A Provider fetches raw data and creates Models. An app can have many Providers.

Constructors

Provider()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
modelDictionary ModelDictionary<Model, Adapter<Model>>
The translation between Adapters and Models
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete<T extends TModel>(T instance, {Query? query, ModelRepository<TModel>? repository}) → dynamic
Remove a model instance
exists<T extends TModel>({Query? query, ModelRepository<TModel>? repository}) → dynamic
Whether a model instance is present. null is returned when existence is unknown. The model instance is not hydrated in the function output; a bool variant (e.g. List<bool>, Map<TModel, bool>) should be returned.
get<T extends TModel>({Query? query, ModelRepository<TModel>? repository}) → dynamic
Query for raw data and construct it with an Adapter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
upsert<T extends TModel>(T instance, {Query? query, ModelRepository<TModel>? repository}) → dynamic
Insert or update a model instance

Operators

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