net_aware 1.0.5
net_aware: ^1.0.5 copied to clipboard
A wrapper widget to detect no internet and block ui with an overlay.
import 'package:flutter/material.dart';
import 'package:net_aware/net_aware.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return NetAware(
child: Scaffold(
appBar: AppBar(
title: const Text('Net Aware'),
),
body: const Center(
child: Text('You are Online!'),
),
),
);
}
}