Marcos Placona
Marcos Placona
Marcos an experienced Developer Relations leader turned solopreneur, GDE and in ❤️ with Open Source
~1 min read

Categories

  • Dart

This is a very simple example of how to create files with Dart. I am working on another example that involves file manipulation, but thought I’d quickly post this one here as to have it out of the way.

In this post I will show you quickly how to create a text file using Futures in Dart. The example will:

  • create the file
  • write some content to it synchronously
  • return a message when the contents have been written

Our code will therefore go as follows:

Dart - Create File

The gist can also be found on GitHub.

 

YOU MIGHT ALSO LIKE