requestStreamSettings method

Future<PolarSensorSetting> requestStreamSettings(
  1. String identifier,
  2. PolarDataType feature
)

Request the stream settings available in current operation mode. This request shall be used before the stream is started to decide currently available settings. The available settings depend on the state of the device. For example, if any stream(s) or optical heart rate measurement is already enabled, then the device may limit the offer of possible settings for other stream feature. Requires polarSensorStreaming feature.

  • Parameters:
    • identifier: polar device id
    • feature: selected feature fromPolarDeviceDataType
  • Returns: Single stream
    • success: once after settings received from device
    • onError: see PolarErrors for possible errors invoked

Implementation

Future<PolarSensorSetting> requestStreamSettings(
  String identifier,
  PolarDataType feature,
) async {
  final response = await _channel.invokeMethod(
    'requestStreamSettings',
    [identifier, feature.toJson()],
  );
  return PolarSensorSetting.fromJson(jsonDecode(response));
}