network_inspector 1.0.3 copy "network_inspector: ^1.0.3" to clipboard
network_inspector: ^1.0.3 copied to clipboard

outdated

Http inspector / logger for Dio and Http package. This package would allow you to log every Http request, response, and error from Dio & Http.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:network_inspector/network_inspector.dart';
import 'package:provider/provider.dart';

import 'common/navigation_service.dart';
import 'common/notification_helper.dart';
import 'presentation/controllers/main_provider.dart';
import 'presentation/pages/main_page.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  NetworkInspector.initialize();
  NotificationHelper.initialize();
  runApp(const ExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider<MainProvider>(
      create: (context) => MainProvider(
        context: context,
      ),
      builder: (context, child) => MaterialApp(
        title: 'Network inspector',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        navigatorKey: NavigationService.navigatorKey,
        initialRoute: MainPage.routeName,
        routes: NavigationService.routes,
      ),
    );
  }
}
29
likes
0
pub points
84%
popularity

Publisher

verified publishermeruyatechnology.com

Http inspector / logger for Dio and Http package. This package would allow you to log every Http request, response, and error from Dio & Http.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, collection, dio, flutter, http, intl, provider, share_plus, sqflite

More

Packages that depend on network_inspector