ansi_logger 2.0.11 copy "ansi_logger: ^2.0.11" to clipboard
ansi_logger: ^2.0.11 copied to clipboard

Flutter package tht help you make pretty logs, and has alogger for http

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
  }
}

  • then you should use this Interceptor
 Dio dio = Dio();
 dio.interceptors.add(_Interceptor());
 dio.get("https://jsonplaceholder.typicode.com/todos/1");
 
6
likes
150
pub points
67%
popularity

Publisher

verified publishernew-step-apps.com

Flutter package tht help you make pretty logs, and has alogger for http

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on ansi_logger