setRate method

Future<void> setRate(
  1. double rate
)

Implementation

Future<void> setRate(double rate) async {
  if (_isDisposed) {
    return;
  }
  if (rate > 2.0) {
    rate = 2.0;
  } else if (rate < 1.0) {
    rate = 1.0;
  }
  await channel.invokeMethod('setRate', <String, dynamic>{
    'textureId': _textureId,
    'rate': rate,
  });
  value = value.copyWith(rate: rate);
}