writeStorageObject method

  1. @override
Future<void> writeStorageObject({
  1. required Session session,
  2. String? collection,
  3. String? key,
  4. String? value,
  5. String? version,
  6. StorageWritePermission? writePermission,
  7. StorageReadPermission? readPermission,
})
override

Implementation

@override
Future<void> writeStorageObject({
  required model.Session session,
  String? collection,
  String? key,
  String? value,
  String? version,
  StorageWritePermission? writePermission,
  StorageReadPermission? readPermission,
}) async {
  _session = session;

  await _api.nakamaWriteStorageObjects(
    body: ApiWriteStorageObjectsRequest(
      objects: [
        ApiWriteStorageObject(
          collection: collection,
          key: key,
          value: value,
          version: version,
          permissionWrite: writePermission?.index,
          permissionRead: readPermission?.index,
        ),
      ],
    ),
  );
}