DataRepository class
Annotation on a DataModel model to request a Repository be generated for it.
Takes a list of adapters to be mixed into this Repository. Public methods of these adapters mixins will be made available in the repository via extensions.
A classic example is:
@JsonSerializable()
@DataRepository([JSONAPIAdapter])
class Todo with DataModel<Todo> {
@override
final int id;
final String title;
final bool completed;
Todo({this.id, this.title, this.completed = false});
}
Constructors
-
DataRepository(List<
Type> adapters, {bool remote = true}) -
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited