InterceptorMock class
You can use for Mock your API
Implements your mockData based example:
const MOCKDATA = {
"/path":{YOURDATA}
};
Examples use `YOURDATA``
YOURDATA = ["1","2"];
YOURDATA = {"name1": "1"}
Constructors
- InterceptorMock(Mock mock)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
DioError err) → Future - The callback will be executed on error.
-
onRequest(
RequestOptions options) → Future - The callback will be executed before the request is initiated.
-
onResponse(
Response response) → Future -
The callback will be executed on success.
If you want to continue the response, call
handler.next
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited