flutter_pretty_dio_logger 3.0.0 copy "flutter_pretty_dio_logger: ^3.0.0" to clipboard
flutter_pretty_dio_logger: ^3.0.0 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
pub points
93%
popularity

Publisher

unverified uploader

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