# set method

void set(

1. String? key,
2. FaceTemplate faceTemplateItem

)

Sets an item of the FaceTemplateDict object.

param key Unique key of the FaceTemplate item to set. param faceTemplateItem FaceTemplate item to set. throws FaceException An error has occurred during Face Library execution.

## Implementation

    void set(String? key, FaceTemplate faceTemplateItem) {
      Pointer<Char>? pKey = key?.toNativeUtf8().cast<Char>();
      try {
        var err = faceSDK.id3FaceTemplateDict_Set(_pHandle.value, pKey ?? nullptr, faceTemplateItem.handle);
        if (err != FaceError.success.value) {
          throw FaceException(err);
        }
      } finally {
        if (pKey != null) {
          calloc.free(pKey);
        }
      }
    }