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
dependencies:
dio_log : ^2.0.2
dio_log:
git:
url: [email protected]:flutterplugin/dio_log.git
ref: v2.0.2
dio.interceptors.add(DioLogInterceptor());
///display overlay button 显示悬浮按钮
showDebugBtn(context,btnColor: Colors.blue);
///cancel overlay button 取消悬浮按钮
dismissDebugBtn();
///overlay button state of display 悬浮按钮展示状态
debugBtnIsShow()
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => HttpLogListWidget(),
),
);
/// Sets the maximum number of entries for logging 设置记录日志的最大条数
LogPoolManager.getInstance().maxCount = 100;