How to write a `ByteData` instance to a File in Dart? : <p>I am using Flutter to load an "asset" into a <code>File</code> so that a native application can access it.</p>

<p>This is how I load the asset:</p>

<pre><code>final dbBytes = await rootBundle.load('assets/file');
</code></pre>

<p>This returns an instance of <code>ByteData</code>.</p>

<p>How can I write this to a <code>dart.io.File</code> instance?</p>
