string property

String? get string

Returns dart String

Implementation

String? get string {
  if (_pointer == nullptr) return null;
  var cString = JSStringRef.jSStringGetCharactersPtr(_pointer);
  if (cString == nullptr) {
    return null;
  }
  int cStringLength = JSStringRef.jSStringGetLength(_pointer);
  return String.fromCharCodes(Uint16List.view(
      cString.cast<Uint16>().asTypedList(cStringLength).buffer,
      0,
      cStringLength));
}