Future<File> safeWriteAsString(File targetFile, String content, { bool verifyJson: false })

Source

Future<File> safeWriteAsString(File targetFile, String content,
    {bool verifyJson : false}) async {
  return _safeWriteBase(
      targetFile, content,
      (File f, content) => f.writeAsString(content, flush: true),
      verifyJson: verifyJson);
}