compassHeading method
override
Get the current compass heading in degrees.
var compassHeading = await myMovementSensor.compassHeading();
For more information, see Movement Sensor component.
Implementation
@override
Future<double> compassHeading({Map<String, dynamic>? extra}) async {
final request = GetCompassHeadingRequest()
..name = name
..extra = extra?.toStruct() ?? Struct();
final response = await client.getCompassHeading(request);
return response.value;
}