createAndWrite function

void createAndWrite(
  1. String path,
  2. String content
)

Implementation

void createAndWrite(String path, String content) {
  final file = File(path);
  file.createSync(recursive: true);
  file.writeAsStringSync(content);
}