DataAdapter class

Annotation on a DataModelMixin model to request an Adapter be generated for it.

Takes a list of adapters to be mixed into this Adapter. Public methods of these adapters mixins will be made available in the adapter via extensions.

A classic example is:

@JsonSerializable()
@DataAdapter([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

DataAdapter(List<Type> adapters)
const

Properties

adapters List<Type>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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