checkIfAvailable method

dynamic checkIfAvailable()

Implementation

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