getChapterTitleByIndex method

String getChapterTitleByIndex(
  1. int index
)

Returns the title of the chapter, indexed by the index argument. Returns an empty string is the core is not initialised or the title is empty.

Implementation

String getChapterTitleByIndex(int index) {
  Pointer<BufferString> str = (getChapterTitleByIndexNative?.call(_sdk, index))!;

  if (str != nullptr) {
    String result = str.ref.toString();

    freeBufferString(str);

    return result;
  }

  return '';
}