run method

void run(
  1. T param
)

Run the given function

Implementation

void run(T param) {
  _timer?.cancel();
  _timer = Timer(duration, ()=>function);
}