writeFile method

Future<String> writeFile({
  1. required String content,
  2. required File file,
})

Creates file and writes content

Implementation

Future<String> writeFile({
  required String content,
  required File file,
}) async {
  await file.create(recursive: true);
  await file.writeAsString(content);
  return file.path;
}