setSamplingRate method

Future<bool> setSamplingRate(
  1. int rate
)

Set the sampling rate for sensor sampling in Hz (min: 1 - max: 100)

Default sampling rate is 10 Hz.

Implementation

static Future<bool> setSamplingRate(int rate) async {
  assert(
      rate != null && samplingRate > 0 && samplingRate <= 100, 'Must provide a sampling rate between 1 and 100 Hz.');
  samplingRate = rate;
  return await _eSenseManagerMethodChannel.invokeMethod('setSamplingRate', <String, dynamic>{'rate': rate});
}