clearInterval static method

void clearInterval([
  1. dynamic handle
])

Implementation

static void clearInterval([dynamic handle]) {
  if (handle == null) return;
  int? id;
  if (handle is int) {
    id = handle;
  } else if (handle is Map && handle['id'] is int) {
    id = handle['id'] as int;
  }
  if (id == null) return;
  _intervals.remove(id)?.cancel();
}