webase_chucker 0.1.4 copy "webase_chucker: ^0.1.4" to clipboard
webase_chucker: ^0.1.4 copied to clipboard

In-app HTTP inspector for Dio. One line to integrate: a floating button, a live status notification, request/response/cURL viewer — no setup needed.

example/lib/main.dart

import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:webase_chucker/webase_chucker.dart';

final dio = Dio()
  ..interceptors.add(WebaseChucker.interceptor); // the only line needed

void main() => runApp(const ExampleApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'webase_chucker example',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(title: const Text('webase_chucker example')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              FilledButton(
                onPressed: () =>
                    dio.get('https://jsonplaceholder.typicode.com/todos/1'),
                child: const Text('GET (200)'),
              ),
              const SizedBox(height: 12),
              FilledButton(
                onPressed: () => dio.post(
                  'https://jsonplaceholder.typicode.com/posts',
                  data: {'title': 'hello', 'body': 'world'},
                ),
                child: const Text('POST (201)'),
              ),
              const SizedBox(height: 12),
              FilledButton(
                onPressed: () =>
                    dio.get('https://jsonplaceholder.typicode.com/nope'),
                child: const Text('GET (404)'),
              ),
              const SizedBox(height: 12),
              OutlinedButton(
                onPressed: WebaseChucker.open,
                child: const Text('Open inspector'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
93
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

In-app HTTP inspector for Dio. One line to integrate: a floating button, a live status notification, request/response/cURL viewer — no setup needed.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

dio, flutter, flutter_local_notifications

More

Packages that depend on webase_chucker