lastPage method

void lastPage()

Navigates to the last page of a PDF document.

Using this method, the SfPdfViewer navigates to the last page of a PDF document. If the current page displayed is already the last page, then nothing happens.

Returns null.

This example demonstrates how to navigate to the first and last page.

class MyAppState extends State<MyApp>{

 late PdfViewerController _pdfViewerController;

 void initState(){
   _pdfViewerController = PdfViewerController();

 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       appBar: AppBar(
          title: Text('Syncfusion Flutter PdfViewer'),
          actions: <Widget>[
                icon: Icon(
                   color: Colors.white,
                onPressed: () {
       body: SfPdfViewer.asset(
         controller: _pdfViewerController,


void lastPage() {
  _pageNavigator = Pagination(Navigation.lastPage);
  _notifyPropertyChangedListeners(property: 'pageNavigate');