writeToFile method
Convenient method to write to a file using either String or raw bytes Uint8List.
Under the hood this method calls writeToFileAsString
or writeToFileAsBytes
depending on which argument is passed.
If both (bytes and content) are passed, the bytes will be used and the content will be ignored.
Implementation
Future<bool?> writeToFile({
String? content,
Uint8List? bytes,
FileMode? mode,
}) =>
saf.writeToFile(
uri,
content: content,
bytes: bytes,
mode: mode,
);