addOutline method
Adds an outline to the current document. Parameters:
parentUuidThe UUID of the parent outline under which the new outline will be added.insertIndexThe index at which to insert the new outline under the parent. Default is -1 (append to the end).titleThe title of the new outline.pageIndexThe index of the page that the outline will point to. example:
bool result = await document.addOutline(
parentUuid: parentOutline.uuid,
insertIndex: 0,
title: 'New Outline',
pageIndex: 0
);
Implementation
Future<bool> addOutline(
{required String parentUuid,
int insertIndex = -1,
required String title,
required int pageIndex}) async {
return await _channel.invokeMethod('add_outline', {
'parent_uuid': parentUuid,
'insert_index': insertIndex,
'title': title,
'page_index': pageIndex
});
}