init method

  1. @override
Future<void> init()
override

Implementation

@override
Future<void> init() async {
  if (_initialized) return;
  final result = await Connectivity().checkConnectivity();
  _updateConnectionStatus(result);
  Connectivity().onConnectivityChanged.listen(
        _updateConnectionStatus,
      );
  _initialized = true;
}