save method
Saves the given simple objects.
If append is false (the default), the file will be overwritten.
If append is true, it will write to the end of the file.
Implementation
Future<File> save(List<Object> simpleObjs, {bool append = false}) async {
_checkIfFileSystemIsTheSame();
File file = _file ?? await this.file();
await file.create(recursive: true);
Uint8List encoded = LocalPersist.encode(simpleObjs);
return file.writeAsBytes(
encoded,
flush: true,
mode: append ? FileMode.writeOnlyAppend : FileMode.writeOnly,
);
}