main function
void
main()
Implementation
void main() {
// Example usage of the NetworkChecker widget
runApp(
NetworkChecker(
networkOffDialog: AlertDialog(
title: const Text('Network Offline'),
content: const Text('Please check your internet connection.'),
actions: [
TextButton(
onPressed: () {
// Handle retry action
},
child: const Text('Retry'),
),
],
),
child: const MyApp(),
),
);
}