useJustJson function
Implementation
RequestInterceptor useJustJson({
required String jsonString,
Duration? responseTime,
int statusCode = 200,
}) {
return RequestInterceptor(interceptor: (Request request) async {
if (responseTime != null) await Future.delayed(responseTime);
var m = jsonDecode(jsonString);
return RequestInterceptorFlow(request,
terminate: true,
response: Response(
statusCode: statusCode,
data: m,
body: jsonString,
));
});
}