MockResponse class

Successful response configuration for a route.

Constructors

MockResponse({required int status, required String? file, required Object? body, required Map<String, String> headers, required int delayMs, required MockErrorResponse? error})
Creates a response configuration.

Properties

body → Object?
final
delayMs → int
final
error → MockErrorResponse?
final
file → String?
final
hasExplicitPayload → bool
Returns true when the response explicitly provides a payload source.
no setter
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → int
final

Methods

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

Operators

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