writeFile static method

Future<File> writeFile(
  1. File file,
  2. String content, {
  3. FileMode? mode,
  4. Encoding? encoding,
  5. bool? flush,
})

Write the file

Implementation

static Future<File> writeFile(
  File file,
  String content, {
  FileMode? mode,
  Encoding? encoding,
  bool? flush,
}) =>
    file.writeAsString(
      content,
      mode: mode ?? FileMode.write,
      encoding: encoding ?? utf8,
      flush: flush ?? true,
    );