Repository class

Indicates a repository interface for code generation.

Annotated classes must be abstract and extend BaseRepository. Datapod generates the implementation based on method naming conventions (DSL) or Query annotations.

Example:

@Repository()
abstract class UserRepository extends BaseRepository<User, int> {
  Future<List<User>> findByName(String name);
}
Annotations
  • @Target.new({TargetKind.classType})

Constructors

Repository()
const

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

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