http_interceptor 2.0.0-beta.6 copy "http_interceptor: ^2.0.0-beta.6" to clipboard
http_interceptor: ^2.0.0-beta.6 copied to clipboard

outdated

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:http_interceptor_example/multipart_app.dart';

import 'weather_app.dart';

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

class ExamplesApp extends StatelessWidget {
  const ExamplesApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: ExamplesMenuScreen(),
    );
  }
}

class ExamplesMenuScreen extends StatelessWidget {
  const ExamplesMenuScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Examples'),
      ),
      body: ListView(
        shrinkWrap: true,
        children: [
          ListTile(
            leading: const Icon(Icons.cloud),
            title: const Text('Weather Example'),
            subtitle: const Text('Simple HTTP Intercepting'),
            onTap: () => Navigator.push<void>(context, WeatherApp.route()),
          ),
          ListTile(
            leading: const Icon(Icons.photo),
            title: const Text('Remove Img Background Example'),
            subtitle: const Text('Multipart Intercepting'),
            onTap: () => Navigator.push<void>(context, MultipartApp.route()),
          ),
        ],
      ),
    );
  }
}
186
likes
0
pub points
98%
popularity

Publisher

verified publishercodingale.dev

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on http_interceptor