Generate class

Annotation for repository methods to auto-generate implementation.

Example:

abstract class ProfileRepository {
  @Generate(apiClient: ProfileApi)
  Future<Either<Failure, ProfileResponse>> getProfile();

  @Generate(apiClient: ProfileApi, refreshes: [Profile])
  Future<Either<Failure, UpdateRequestResponse>> changeProfileInfo({
    required ProfileRequestBody requestBody,
  });
}

Constructors

Generate({required Type apiClient, List<Type> refreshes = const []})
const

Properties

apiClient Type
The API client type to use for the generated implementation.
final
hashCode int
The hash code for this object.
no setterinherited
refreshes List<Type>
List of types to emit refresh signals for on successful completion.
final
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