statusCode property

  1. @override
int statusCode
override

Returns the status code.

The status code must be set before the body is written to. Setting the status code after writing to the body will throw a StateError.

Implementation

@override
int get statusCode =>
    // ignore: invalid_use_of_visible_for_testing_member
    super.noSuchMethod(Invocation.getter(#statusCode), returnValue: 0) as int;