events property

Stream<CompassEvent>? get events

Provides a Stream of compass events that can be listened to.

Implementation

static Stream<CompassEvent>? get events {
  _stream ??= _compassChannel
      .receiveBroadcastStream()
      .map((dynamic data) => CompassEvent.fromList(data?.cast<double>()));
  return _stream;
}