hingeAngleEvents property

Stream<double> hingeAngleEvents

A broadcast stream of events from the device hinge angle sensor.

If the device is not equipped with a hinge angle sensor, this stream is empty.

Implementation

static Stream<double> get hingeAngleEvents {
  try {
    if (_hingeAngleEvents == null) {
      _hingeAngleEvents = _repeatLatest(
        _hingeAngleEventChannel
            .receiveBroadcastStream()
            .map((event) => event as double),
      );
    }
    return _hingeAngleEvents!;
  } catch (e) {
    return Stream.empty();
  }
}