TransitionPage<T> class
A page that can use separate push and pop animations.
pushTransition and popAnimation
can use one of the built-in transitions:
- PageTransition.none - an immediate transition without any animation.
- PageTransition.fadeUpwards - the default Android fade-up animation.
- PageTransition.cupertino - the default iOS slide-in animation.
- PageTransition.zoom - a zoom animation used on Android 10.
Alternatively you can subclass PageTransition to create your own custom animation.
If pushTransition or popAnimation
are null, the platform default
transition is used. This is the Cupertino animation on iOS and macOS, and
the fade upwards animation on all other platforms.
- Inheritance
-
- Object
- RouteSettings
- Page<
T> - TransitionBuilderPage<
T> - TransitionPage
Constructors
- TransitionPage({required Widget child, PageTransition? pushTransition, PageTransition? popTransition, bool maintainState = true, bool fullscreenDialog = false, bool opaque = true, LocalKey? key, String? name, Object? arguments, String? restorationId})
-
Initialize a transition page.
const
Properties
- arguments → Object?
-
The arguments passed to this route.
finalinherited
- child → Widget
-
The content to be shown in the Route created by this page.
finalinherited
- fullscreenDialog → bool
-
Whether this page route is a full-screen dialog.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → LocalKey?
-
The key associated with this page.
finalinherited
- maintainState → bool
-
Whether the route should remain in memory when it is inactive.
finalinherited
- name → String?
-
The name of the route (e.g., "/settings").
finalinherited
- opaque → bool
-
Whether the route obscures previous routes when the transition is complete.
finalinherited
- popTransition → PageTransition?
-
Configures the transition animation used when this page is popped.
final
- pushTransition → PageTransition?
-
Configures the transition animation used when this page is pushed.
final
- restorationId → String?
-
Restoration ID to save and restore the state of the Route configured by
this page.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildPopTransition(
BuildContext context) → PageTransition -
Called when this page is popped, returns a PageTransition to configure
the pop animation.
override
-
buildPushTransition(
BuildContext context) → PageTransition -
Called when this page is pushed, returns a PageTransition to configure
the push animation.
override
-
canUpdate(
Page other) → bool -
Whether this page can be updated with the
other
page.inherited -
createRoute(
BuildContext context) → Route< T> -
Creates the Route that corresponds to this page.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited