network_status_p 0.0.2 copy "network_status_p: ^0.0.2" to clipboard
network_status_p: ^0.0.2 copied to clipboard

Network status analyzer.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:network_status_p/network_status_p.dart';
  
void main() => runApp(MyApp());

/// this is your APP Main screen configuration
class MyApp extends StatelessWidget {
  MyApp({Key? key}) : super(key: key);

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



class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);
  
  @override
  State<HomePage> createState() => _HomePageState();
}
  
class _HomePageState extends State<HomePage> {
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Network app"),
      ),
      body: NetChecker(
        netDuration: Duration(seconds: 2),
      )
    );
  }
}