get method

Field get(
  1. String? key
)

Gets an item of the Field object.

param key Unique key of the Field item to get. return Field item to get. throws BiosealException An error has occurred during Bioseal Library execution.

Implementation

Field get(String? key) {
  Pointer<Char>? pKey = key?.toNativeUtf8().cast<Char>();
  Field fieldItem = Field();
  try {
    var err = biosealSDK.id3BiosealField_Get(_pHandle.value, pKey ?? nullptr, fieldItem.handle);
    if (err != BiosealError.success.value) {
      fieldItem.dispose();
      throw BiosealException(err);
    }
    return fieldItem;
  } finally {
    if (pKey != null) {
      calloc.free(pKey);
    }
  }
}