same file.</p>
<p>On Windows the regions used for lock and unlock needs to match. If that
is not the case unlocking will result in the OS error "The segment is
already unlocked".</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">Future&lt;RandomAccessFile&gt; lock(
    [FileLock mode = FileLock.exclusive, int start = 0, int end = -1]);</code></pre>
    </section>

  </div> <!--