getNumberOfPositionsWithLabels method

  1. @override
Future<PositionsInfo> getNumberOfPositionsWithLabels({
  1. Map<String, dynamic>? extra,
})
override

Get the number of available positions (int) and the list of labels of the Switch.

await mySwitch.getNumberOfPositionsWithLabels();

For more information, see Switch component.

Implementation

@override
Future<PositionsInfo> getNumberOfPositionsWithLabels({Map<String, dynamic>? extra}) async {
  final request = GetNumberOfPositionsRequest()
    ..name = name
    ..extra = extra?.toStruct() ?? Struct();
  return await client.getNumberOfPositions(request, options: callOptions);
}