getElectricConnectivityState function

ConnectivityState getElectricConnectivityState(
  1. BaseElectricClient? electric
)

Implementation

ConnectivityState getElectricConnectivityState(BaseElectricClient? electric) {
  if (electric == null) {
    return _kStates.disconnected;
  }

  return electric.isConnected ? _kStates.connected : _kStates.disconnected;
}