Overview
TransparentRoute and TransparentPage provide transparent page routes that allow underlying content to remain visible. This is useful for overlays, modals, or dialogs that should not completely obscure the content beneath them.
TransparentPage
A page that creates a transparent route when used with Navigator 2.Constructor
The content to be shown in the route created by this page.
Whether to maintain the state of the route when it’s not visible.
Whether this page should be treated as a fullscreen dialog.
The color of the barrier that blocks interaction with routes below.
Usage with NavigationData
TransparentRoute
A programmatic transparent route for use with Navigator 1 API or custom navigation.Constructor
Builder function for the route’s widget.
Whether to maintain the state of the route when it’s not visible.
Builder function for custom route transitions. Defaults to a simple fade transition.
The color of the barrier that blocks interaction with routes below.
Direct usage
FadeUpwardsPageTransition
The transparent routes use a custom fade upwards transition that preserves the appearance of underlying routes.- Fades in the new route with an ease-in curve
- Slides the content upwards from 1/4 screen below
- Ensures underlying content remains visible and stationary
Key features
Non-opaque routes
Routes are not opaque, allowing content underneath to show through
Custom barrier colors
Configure barrier color and opacity for different overlay effects
Preserved animations
Custom transitions prevent unwanted animations on underlying routes
Accessibility support
Includes proper Semantics for screen readers
Common use cases
Modal overlays
Bottom sheets
Floating dialogs
Transparent routes override default Android
OpenUpwardsPageTransition and iOS CupertinoSlideTransition to ensure the route below stays stationary and visible.