applyException method
Transitions either response or loadMoreResponse into an exception state.
Implementation
LikePaginatedResponse<T> applyException(
String message, {
Object? error,
int page = 1,
}) {
final exceptionResponse = LikeStateResponse<List<T>>.exception(
message,
error: error,
);
if (page == 1) {
return copyWith(response: exceptionResponse);
}
return copyWith(loadMoreResponse: exceptionResponse);
}