# getValueAsString method

String getValueAsString()

Gets the the field value as a string.

return The field value as a string. throws BiosealException An error has occurred during Bioseal Library execution.

## Implementation

    String getValueAsString() {
      Pointer<Char> pValueAsString = nullptr;
      Pointer<Int> pValueAsStringSize = calloc.allocate(1);
      pValueAsStringSize[0] = -1;
      try {
        var err = biosealSDK.id3BiosealField_GetValueAsString(_pHandle.value, pValueAsString, pValueAsStringSize);
        if (err == BiosealError.insufficientBuffer.value) {
          pValueAsString = calloc.allocate(pValueAsStringSize.value);
          err = biosealSDK.id3BiosealField_GetValueAsString(_pHandle.value, pValueAsString, pValueAsStringSize);
          if (err != BiosealError.success.value) {
            throw BiosealException(err);
          }
        }
        final vValueAsString = utf8.decode(Uint8List.fromList(pValueAsString.cast<Uint8>().asTypedList(pValueAsStringSize.value)));
        return vValueAsString;
      } finally {
        calloc.free(pValueAsString);
        calloc.free(pValueAsStringSize);
      }
    }