dio_log_viewer 1.0.4 copy "dio_log_viewer: ^1.0.4" to clipboard
dio_log_viewer: ^1.0.4 copied to clipboard

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

dio_log_viewer #

Pub support

Features #

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

Preview #

App preview

Getting started #

import 'package:dio_log_viewer/dio_log_viewer.dart';

Usage #

  1. init dio and add interceptor
Dio dio = Dio();
...
dio.interceptors.add(DioLogViewerInterceptor());
  // enable: true, default true
  final bool enable;
  // max log count, default 50
  final int maxLogCount;

  DioLogViewerInterceptor({this.enable = true,this.maxLogCount = 50});
  1. show log drag button to app entry
DioLogViewer.showLogButton(context);
  1. Click the Log button and you will see the intercepted request log

  2. hidden log button

DioLogViewer.dismiss()

Note: By the way, you can also use the following code to get the log data

navigate to the log page LogViewerListPage()

Navigator.of(context).push(CupertinoPageRoute(builder: (context){
                  return const LogViewerListPage();
                }));
0
likes
150
pub points
35%
popularity

Publisher

verified publishersuntengfei.top

A dio helper plug-in,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

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_log_viewer