pub enum PageTransitionsBuilder {
Zoom,
Cupertino,
FadeForwards,
}Expand description
One of the reference’s page transitions.
Variants§
Zoom
The page zooms in from 85 % over a scrim, the one under it grows a little; popping,
the page shrinks away and fades (ZoomPageTransitionsBuilder). What the desktops
use by default, and what a platform with no builder falls back to.
Cupertino
The page slides in from the end edge while the one under it drifts a third of the
way towards the start, as iOS pages do (CupertinoPageTransitionsBuilder).
FadeForwards
The page slides a quarter of the way in as it fades in, and the one under it a
quarter of the way out as it fades out, as Android’s own pages do
(FadeForwardsPageTransitionsBuilder). What Android uses when no back gesture is
under way.
Implementations§
Source§impl PageTransitionsBuilder
impl PageTransitionsBuilder
Sourcepub fn transition_duration(self) -> f32
pub fn transition_duration(self) -> f32
How long a push or a pop takes, in seconds: 300 ms for the zoom, 500 for the iOS
slide, 450 for the fade (page_transitions_builder.dart:66, route.dart:155,
page_transitions_theme.dart:470).
Sourcepub fn frame(
self,
progress: f32,
forward: bool,
gesture: bool,
) -> TransitionFrame
pub fn frame( self, progress: f32, forward: bool, gesture: bool, ) -> TransitionFrame
What is painted progress of the way through a transition, 0 being the old page
at rest and 1 the new one. forward is a push; otherwise a pop, where the top
page is the one leaving. gesture is a finger dragging a pop: the motion follows it
linearly, as the reference’s does while a pop gesture is under way.