createAndWriteFile static method

Future<File> createAndWriteFile(
  1. String filePath,
  2. dynamic content
)

Implementation

static Future<File> createAndWriteFile(String filePath, content) async {
  final path = await _localPath;
  final file = File('$path/$filePath');
  await file.writeAsBytes(content);
  return file;
}