writeContent2Path function

Future<void> writeContent2Path(
  1. String path,
  2. String fileName,
  3. String content
)

Implementation

Future<void> writeContent2Path(
    String path, String fileName, String content) async {
  var file = fs.file('$path/$fileName');

  var sink = file.openWrite();
  sink.write(content);
  await sink.flush();
  await sink.close();
  return Future.value();
}