Skip to main content

app_inspect_dio 0.2.1 copy "app_inspect_dio: ^0.2.1" to clipboard
app_inspect_dio: ^0.2.1 copied to clipboard

Captures Dio requests for the AppInspect in-app network inspector.

example/main.dart

import 'package:app_inspect/app_inspect.dart';
import 'package:app_inspect_dio/app_inspect_dio.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';

// Add AppInspect last, so it sees the headers other interceptors add.
final Dio dio = Dio()..interceptors.add(AppInspectDioInterceptor());

void main() => runApp(AppInspect.wrap(const MyApp()));

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorObservers: [AppInspect.navigatorObserver],
      home: Scaffold(
        body: Center(
          // Send a request, then tap the AppInspect bubble to see it.
          child: FilledButton(
            onPressed: () => dio.get<dynamic>('https://dummyjson.com/products/1'),
            child: const Text('Send a request'),
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
128
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Captures Dio requests for the AppInspect in-app network inspector.

Topics

#dio #network #debugging

License

MIT (license)

Dependencies

app_inspect, dio, flutter

More

Packages that depend on app_inspect_dio