pretty_dio_logger

Last updated:

0 purchases

pretty_dio_logger Image
pretty_dio_logger Images
Add to Cart

Description:

pretty dio logger

pretty_dio_logger #

Pretty Dio logger is a Dio interceptor that logs network calls in a pretty, easy to read format.
Usage #
Simply add PrettyDioLogger to your dio interceptors.
Dio dio = Dio();
dio.interceptors.add(PrettyDioLogger());

// customization
dio.interceptors.add(PrettyDioLogger(
requestHeader: true,
requestBody: true,
responseBody: true,
responseHeader: false,
error: true,
compact: true,
maxWidth: 90,
enabled: kDebugMode,
filter: (options, args){
// don't print requests with uris containing '/posts'
if(options.path.contains('/posts')){
return false;
}
// don't print responses with unit8 list data
return !args.isResponse || !args.hasUint8ListData;
}
)
);
copied to clipboard
How it looks like #
VS Code #


Android studio #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.