InternetWidget constructor
const
InternetWidget({
- Key? key,
- double? height,
- double? width,
- required Widget? online,
- String? lookupUrl,
- Widget? loadingWidget,
- VoidCallback? whenOffline,
- VoidCallback? whenOnline,
- Connectivity? connectivity,
- OfflineWidgetType? offline,
Use InternetWidget to show online or offline widgets
InternetWidget(
key: ValueKey('internet-widget'),
loadingWidget: Center(
child: CircularProgressIndicator(),
),
lookupUrl: 'example.com',
offline: const Text(
'Offline',
),
online: const Text(
'Online',
),
),
In case you want to use the default settings, just provide the online widget
InternetWidget(
online: Container(),
),
Implementation
const InternetWidget({
super.key,
this.height,
this.width,
required this.online,
this.lookupUrl,
this.loadingWidget,
this.whenOffline,
this.whenOnline,
this.connectivity,
this.offline,
});