dio_log 1.3.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 85

dio_log #

pub package

http requests log of dio #

基于dio的网络请求日志 #

Add dependency #

添加依赖 #

dependencies: 
  dio_log : ^1.3.3

github #

dio_log:
  git:
  url: git@github.com:flutterplugin/dio_log.git
  ref: develop

set interceptor of dio #

给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);
///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;

Screenshot #

gif demo #

gif

[v1.3.3] - 2019/9/18

  • Support dio > 3.0.0

[v1.3.2] - 2019/9/18

  • Support Flutter Web
  • Support dio >2.2.1
  • if you dio version < 2.2.1, please use dio_log:1.3.1

[v1.3.1] - 2019/9/05

  • fix shrink and expand bug

[v1.3.0] - 2019/8/21

  • Optimize the request display UI
  • HttpLogInterceptor Deprecated and change it to DioLogInterceptor

[v1.2.1] - 2019/8/05

  • add example project
  • Fix the response parsing bug

[v1.2.0] - 2019/8/01

  • add overlay_draggable_button(Global float window is easier to open HttpLogListWidget)
  • add clear log function at requestList
  • add display requestTime at requestList

[v1.1.1] - 2019/7/22

  • add Screenshot

[v1.1.0] - 2019/7/22

  • support jsonView look at json

[v1.0.3] - 2019/7/16

  • fix some code
  • Lower the version needed by dio

[v1.0.2] - 2019/7/16

  • Add description information and example

[v1.0.1] - 2019/6/6

  • Add a display of the body content to the request
  • Logs with failed requests are shown in red in the list

[v1.0.0] - 2018/09/04

  • initial version

example/README.md

example #

example of dio log

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dio_log: ^1.3.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dio_log/dio_log.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Dec 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
dio ^3.0.0 3.0.7
flutter 0.0.0
Transitive dependencies
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7 1.1.8
path 1.6.4
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test