flutter_pretty_dio_logger 2.0.3 copy "flutter_pretty_dio_logger: ^2.0.3" to clipboard
flutter_pretty_dio_logger: ^2.0.3 copied to clipboard

Show the correct json format, cUrl, easy to copy and use for many purposes.

example/main.dart

import 'package:dio/dio.dart';
import 'package:flutter_pretty_dio_logger/flutter_pretty_dio_logger.dart';

void main() {
  final Dio dio = Dio();

  dio.options.baseUrl = 'https://api.covid19api.com';

  dio.interceptors.add(
    PrettyDioLogger(
      requestHeader: true,
      queryParameters: true,
      requestBody: true,
      responseHeader: true,
      responseBody: true,
      error: true,
      showProcessingTime: true,
      showCUrl: true,
      // canShowLog: kDebugMode,
    ),
  );
  // Note: logPrint default is "log", it is work only when Debugging - https://github.com/Dart-Code/Dart-Code/issues/3653
  dio.get('/world/total');
}
25
likes
150
points
25.1k
downloads

Publisher

unverified uploader

Weekly Downloads

Show the correct json format, cUrl, easy to copy and use for many purposes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio

More

Packages that depend on flutter_pretty_dio_logger