scrollDirection property Null safety

PdfScrollDirection scrollDirection

The direction in which the PDF page scrolls.

Defaults to PdfScrollDirection.vertical

Note: When pageLayoutMode is PdfPageLayoutMode.single then this property defaults to horizontal scroll direction and does not have any effect on vertical scroll direction for now.

This example demonstrates how to set the scroll direction to the SfPdfViewer.

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'),
       body: SfPdfViewer.asset(
         controller: _pdfViewerController,
         scrollDirection: PdfScrollDirection.horizontal,


final PdfScrollDirection scrollDirection;