ApiResponse.unauthorized constructor
ApiResponse.unauthorized([
- String? message
Unauthorized response (401)
Implementation
factory ApiResponse.unauthorized([String? message]) {
return ApiResponse.json(
{'error': message ?? 'Unauthorized'},
statusCode: 401,
);
}