0 purchases
ansi logger
ansi_logger #
Pretty logger with ansi colors
How to use #
see the example
Screenshots #
Working with dio #
first create Interceptor and override onRequest and onError method
class _Interceptor extends Interceptor {
@override
void onError(DioError err, ErrorInterceptorHandler handler) {
super.onError(err, handler);
// See the example to know how to log this Error
}
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
super.onResponse(response, handler);
// See the example to know how to log this response
}
}
copied to clipboard
then you should use this Interceptor
Dio dio = Dio();
dio.interceptors.add(_Interceptor());
dio.get("https://jsonplaceholder.typicode.com/todos/1");
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.