HttpStatusException constructor

const HttpStatusException({
  1. required int statusCode,
  2. required String message,
  3. String? responseBody,
  4. Object? cause,
})

Implementation

const HttpStatusException({
  required this.statusCode,
  required String message, // 1. Accept message as a regular named parameter
  this.responseBody,
  super.cause,             // 2. This works because 'cause' is named in the superclass
}) : super(message);