PdfViewerTopBar
Android default — delegates to PdfViewerTopBarMinimalMono.
backLabel is intentionally accepted but ignored: Material's back affordance is glyph-only, so emulating iOS's "Files →" prefix on Android would clash with platform conventions.
Platform-aware default topbar for PdfViewer. Picks the design direction the host platform expects out of the box:
Android → PdfViewerTopBarMinimalMono — modern, brand-neutral, download as the visually dominant action.
iOS → PdfViewerTopBarClassicIos — chevron + back label, centered title, three iOS-blue trailing icons.
Both variants are public composables in their own right — call them directly when you need to pin a specific look (e.g. a cross-platform Material-style topbar on iOS as well).
Each action button can be hidden via the matching show… flag without removing the wired callback. The search affordance is false by default since search is opt-in — wire onSearch and set showSearch to true to surface it.
subtitle only shows up in the Minimal Mono variant; the iOS variant has no room for it. backLabel only shows up in the iOS variant.
Parameters
filename / document name.
applied to the outer container.
how the title behaves when it is too long to fit. PdfTopBarTitleOverflow.Ellipsis (default) truncates with … like Android; PdfTopBarTitleOverflow.Marquee scrolls it. The back affordance and the action icons keep their size on both platforms — only the title yields.
UPPERCASE meta line for Minimal Mono — typically "PDF · 2.4 MB".
iOS-only previous-screen label rendered next to the chevron (e.g. "Files"). Ignored on Android.
callback when the back affordance is tapped.
callback when the search affordance is tapped.
callback when the share affordance is tapped.
callback when the print affordance is tapped.
callback when the download affordance is tapped.
callback when the highlight-annotation toggle is tapped. Surfaced only when showAnnotate is true.
visibility of the back affordance.
visibility of the search affordance.
visibility of the share affordance.
visibility of the print affordance. false by default since printing is opt-in — wire onPrint and set this to true to surface it.
visibility of the download affordance.
visibility of the highlight-annotation toggle. false by default — annotation tools are opt-in.
whether annotation mode is currently on, so the toggle can render an "active" treatment.
iOS default — delegates to PdfViewerTopBarClassicIos.
subtitle is intentionally accepted but ignored: the Classic iOS topbar is 52dp tall with no room for a second line, matching Mail / Files / Notes conventions.
Desktop default — delegates to PdfViewerTopBarMinimalMono, the same brand-neutral, Material-flavoured bar Android uses. It reads naturally with a mouse and keyboard, where the iOS chevron-and-label convention would feel out of place.
backLabel is accepted but ignored, mirroring the Android backend.