NoParams class

A sentinel class for UseCases that don't require parameters.

Use NoParams when your UseCase doesn't need any input parameters. This provides a more explicit and type-safe alternative to using void or null.

Example:

class GetAllUsersUseCase extends UseCase<List<User>, NoParams> {
  @override
  Future<List<User>> execute(NoParams params, CancelToken? cancelToken) async {
    return repository.getAllUsers();
  }
}

// Usage
final result = await getAllUsersUseCase(const NoParams());

Constructors

NoParams()
Create a NoParams instance
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith() → NoParams
Creates a copy of this NoParams instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override