MockClientDelegate class
This class is used for mocking responses instead of api request Example:
const Map<String, String> responseMap = {
- Inheritance
-
- Object
- DioClientDelegate
- MockClientDelegate
Constructors
-
MockClientDelegate({required Map<
String, String> responseMap, required dynamic onResponse(String)})
Properties
- client → Dio
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- onResponse → dynamic Function(String)
-
final
-
responseMap
→ Map<
String, String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
invokeAPI(
String basePath, String path, Iterable< QueryParam> queryParams, Object? body, Options options, {bool passErrorsAsApiResponses = false}) → Future<ApiResponse> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
responseToStream(
String response) → Stream< List< int> > -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited