Show or hide the UI in our Flutter viewer

Nutrient Flutter SDK offers a few ways to show or hide the user interface (UI). The table below outlines the supported options.

Option
Description
automatic The toolbar and the user interface will show or hide when tapping on the page.
automaticNoFirstLastPage Like automatic, but the user interface will show on the first and last page of the document (only supported on Android).
always The user interface will always be visible.
never The user interface will always be hidden.

The user interface view mode can be changed using the userInterfaceViewMode configuration option. The following example shows how to use the automatic view mode:

PdfConfiguration(
    userInterfaceViewMode: PspdfkitUserInterfaceViewMode.automatic
);

Here’s how automatic works:

Android
iOS