deleteFile method

Future<DeleteFileResult> deleteFile(
  1. String channel,
  2. String fileId,
  3. String fileName, {
  4. Keyset? keyset,
  5. String? using,
})

Deletes file with fileId and fileName from channel.

If keyset is not provided, then it tries to obtain a keyset using name. If that fails, then it uses the default keyset. If that fails as well, then it will throw InvariantException.

Implementation

Future<DeleteFileResult> deleteFile(
    String channel, String fileId, String fileName,
    {Keyset? keyset, String? using}) async {
  keyset ??= _core.keysets[using];
  return defaultFlow<DeleteFileParams, DeleteFileResult>(
      keyset: keyset,
      core: _core,
      params: DeleteFileParams(keyset, channel, fileId, fileName),
      serialize: (object, [_]) => DeleteFileResult.fromJson(object));
}