# getTemplate method

FaceTemplate getTemplate(

1. String? id

)

Retrieves a template from the face indexer by ID.

param id ID of the required face template. return The face template. throws FaceException An error has occurred during Face Library execution.

## Implementation

    FaceTemplate getTemplate(String? id) {
      Pointer<Char>? pId = id?.toNativeUtf8().cast<Char>();
      FaceTemplate faceTemplate = FaceTemplate();
      try {
        var err = faceSDK.id3FaceIndexer_GetTemplate(_pHandle.value, pId ?? nullptr, faceTemplate.handle);
        if (err != FaceError.success.value) {
          faceTemplate.dispose();
          throw FaceException(err);
        }
        return faceTemplate;
      } finally {
        if (pId != null) {
          calloc.free(pId);
        }
      }
    }