checkIfAvailable method

dynamic checkIfAvailable()

Implementation

checkIfAvailable() async {
  if(!(await _environmentSensors.getSensorAvailable(SensorType.Humidity))){
    print("Humidity sensor not available.");
    throw PlatformException(code: "SENSOR_NOT_AVAILABLE", message: "Humidity sensor not available.");
  }
}