Pdf Navigation from Table of contents Pdf Navigation from Table of contents dart dart

Pdf Navigation from Table of contents


You can use Anchor and Link widgets from pdf/widgets.dart for internal navigation inside the generated PDF.Just create an Anchor on the page to which you want to navigate to. You need to provide a name parameter for it and it should be unique.

Anchor(name:'my_anchor', child: any_child_widget);

You can now refer to that anchor from another page using Link widget.

Link(destination:'my_anchor',child: any_child_widget);

You can enclose any child within the Anchor and Link widget.