dio_log_plus 3.7.12 copy "dio_log_plus: ^3.7.12" to clipboard
dio_log_plus: ^3.7.12 copied to clipboard

A plug-in that captures requests and views them within the application, providing functions such as request replication and JSON expansion

dio_log_plus #

pub package

Language: English | 中文简体

HTTP Inspector tool for Dart which can debugging http requests,Currently, DIO based HTTP capture is implemented

Of course, you can implement an Interceptor instead of a DiologInterceptor to adapt to other HTTP clients

Add dependency #

## flutter: ">=3.10.0 <4.0.0"
dependencies:
  dio_log_plus: ^4.0.0

old version flutter: ">=1.17.0 <3.10.0" #

dependencies:
  dio_log_plus: ^3.7.12

set interceptor of dio #

dio.interceptors.add(DioLogInterceptor());

Add a global hover button on your home page to jump through the log list #

///display overlay button
showDebugBtn(context,btnColor: Colors.blue);
///cancel overlay button
dismissDebugBtn();
///overlay button state of display
debugBtnIsShow()

Or open a log list where you want it to be #

Navigator.of(context).push(
    MaterialPageRoute(
      builder: (context) => HttpLogListWidget(),
    ),
  );

Other configurable parameters #

/// Sets the maximum number of entries for logging
LogPoolManager.getInstance().maxCount = 100;
///Add the isError method implementation to LogPoolManager so that request messages defined as errors are displayed in red font
LogPoolManager.getInstance().isError = (res) => res.resOptions==null;
///Disabling Log Printing
DioLogInterceptor.enablePrintLog = false;

Thanks #

dio_log

Screenshot #

1
likes
60
points
51
downloads

Publisher

unverified uploader

Weekly Downloads

A plug-in that captures requests and views them within the application, providing functions such as request replication and JSON expansion

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dio, flutter

More

Packages that depend on dio_log_plus