previousPage method Null safety

void previousPage()

Navigates to the previous page of a PDF document.

Using this method, the SfPdfViewer navigates to the previous page of a PDF document. If the previous page doesn't exists, then the navigation will not happen and the older page will be retained.

Returns null.

This example demonstrates how to navigate to the next and previous 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 previousPage() {
  _pageNavigator = Pagination(Navigation.previousPage);
  notifyPropertyChangedListeners(property: 'pageNavigate');