getText method

String getText(
  1. int chapter
)

Returns the text contents of the current page. Returns an emptry string, if the core is not initialised.

Implementation

String getText(int chapter) {
  Pointer<BufferString> str = (getTextNative?.call(_sdk, chapter))!;

  String result = str.ref.toString();

  if (str != nullptr) {
    freeBufferString(str);

    return result;
  }

  return '';
}