flutter_network_inspector 0.1.2 flutter_network_inspector: ^0.1.2 copied to clipboard
This package helps you to monitor networks calls done using the http package with in the app. if you are using the dart's http package and not using any third party packages, you an use this library t [...]
import 'package:flutter/material.dart';
import 'package:flutter_network_inspector/ui/fni_home.dart';
import 'package:network_interceptor_demo/services.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Network Inspector Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const Home(),
);
}
}
class Home extends StatefulWidget {
const Home({super.key});
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback(
(_) => Services.executeTestCalls(),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 3,
title: const Text('Flutter Network Inspector'),
),
body: const FNIHome(),
);
}
}