read method

bool read()

Reads the state of the led.

Implementation

bool read() {
  _checkStatus();
  var data = malloc<Int8>(1);
  try {
    _checkError(_nativeLedRead(_ledHandle, data));
    return data[0] == 0 ? false : true;
  } finally {
    malloc.free(data);
  }
}