pub struct PredictiveBackFullscreenPageTransitionsBuilder {
pub fallback_color: Option<Color>,
}Expand description
Used by PageTransitionsTheme to define a MaterialPageRoute page transition animation
that looks like Android’s Full Screen page transition.
Predictive back is only supported on Android U and above, and if this
PageTransitionsBuilder is used by any other platform, it will fall back to
ZoomPageTransitionsBuilder.
When used on Android U and above, animates along with the back gesture to reveal the destination route. Can be canceled by dragging back towards the edge of the screen.
See also:
PredictiveBackPageTransitionsBuilder, which is the default Android predictive back page transition.FadeForwardsPageTransitionsBuilder, which defines the default page transition that’s similar to the one provided in Android 16.ZoomPageTransitionsBuilder, which defines the default page transition that’s similar to the one provided in Android 10.OpenUpwardsPageTransitionsBuilder, which defines a page transition that’s similar to the one provided by Android 9.FadeUpwardsPageTransitionsBuilder, which defines a page transition that’s similar to the one provided by Android 8.CupertinoPageTransitionsBuilder, which defines a horizontal page transition that matches native iOS page transitions.- https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces, which is the native Android docs for this page transition.
Fields§
§fallback_color: Option<Color>The color of the scrim (background) when the predictive back transition is not supported.
If not provided, the background color of a default ZoomPageTransitionsBuilder will
be used.
Implementations§
Source§impl PredictiveBackFullscreenPageTransitionsBuilder
impl PredictiveBackFullscreenPageTransitionsBuilder
Sourcepub const fn new() -> PredictiveBackFullscreenPageTransitionsBuilder
pub const fn new() -> PredictiveBackFullscreenPageTransitionsBuilder
Creates an instance of a PageTransitionsBuilder that matches Android U’s full screen
predictive back transition.
Sourcepub const fn fallback_color(
self,
fallback_color: Color,
) -> PredictiveBackFullscreenPageTransitionsBuilder
pub const fn fallback_color( self, fallback_color: Color, ) -> PredictiveBackFullscreenPageTransitionsBuilder
Dart PredictiveBackFullscreenPageTransitionsBuilder(fallbackColor:).
Trait Implementations§
impl Copy for PredictiveBackFullscreenPageTransitionsBuilder
Source§impl PageTransitionsBuilder for PredictiveBackFullscreenPageTransitionsBuilder
impl PageTransitionsBuilder for PredictiveBackFullscreenPageTransitionsBuilder
Source§fn build_transitions(
&self,
_app: &mut App,
route: AnyPageRoute,
_context: BuildContext,
animation: AnimationRef<f64>,
secondary_animation: AnimationRef<f64>,
child: WidgetRef,
) -> WidgetRef
fn build_transitions( &self, _app: &mut App, route: AnyPageRoute, _context: BuildContext, animation: AnimationRef<f64>, secondary_animation: AnimationRef<f64>, child: WidgetRef, ) -> WidgetRef
route arrives on
and leaves the screen. Read more