BaseUseCase<Type, Params> class abstract

The contract for all Use Cases in the application.

Type is the return type of the use case when successful. Params is the parameter type required by the use case.

Example:

class GetUser implements BaseUseCase<User, String> {
  final UserRepository repository;

  GetUser(this.repository);

  @override
  Future<Either<Failure, User>> call(String userId) async {
    return repository.getUser(userId);
  }
}

Constructors

BaseUseCase()

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

call(Params params) Future<Either<Failure, Type>>
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