position method
override
Get the current angle (degrees) of the Servo.
var angle = await myServo.position();
For more information, see Servo component.
Implementation
@override
Future<int> position({Map<String, dynamic>? extra}) async {
final request = GetPositionRequest()
..name = name
..extra = extra?.toStruct() ?? Struct();
final response = await client.getPosition(request);
return response.positionDeg;
}