write static method
Write the file.
content
is the data to write to the file.
folder
is the folder to write the file to.
fileName
is the name of the file.
encrypter
is an additional function to encrypt the data.
Implementation
static Future<void> write({
required String content,
required Folder folder,
required String fileName,
String Function(String plaintext)? encrypter,
}) async {
try {
(await _initFile(
folder: folder,
fileName: fileName,
))
.writeAsStringSync(encrypt(content, encrypter));
} catch (_) {
// Do nothing
}
}