="parameter-name">callback</span>()</span>)
    </section>

    <section class="desc markdown">
      <p>Creates a new timer.</p>
<p>The <code>callback</code> function is invoked after the given <code>duration</code>.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span> </h2>
      <pre class="language-dart"><code class="language-dart">factory Timer(Duration duration, void callback()) {
  if (Zone.current == Zone.root) {
    &#47;&#47; No need t