setRate method Null safety

void setRate(
  1. double rate
)

Implementation

void setRate(double rate) {
  currentRate = rate;
  player?.playbackRate = rate;
}