write method Null safety

Future<void> write(
  1. String path
)

Records a request to write the asset defined by the path to _wasabiService.

The request is received by BackupService and is added to the database. Afterwards it calls _writePending that will query the database for any BackupModel that was not processed yet and process it in FIFO order. TODO check if the path is already in the repository to avoid duplicates

Implementation

Future<void> write(String path) async {
  BackupModel bkpModel = BackupModel(path: path);
  _repository.save(bkpModel);
  await _writePending();
}