MaterialPage<T> class

A page that creates a material style PageRoute.

For Android, the entrance transition for the page slides the route upwards and fades it in. The exit transition is the same, but in reverse.

The transition is adaptive to the platform and on iOS, the route slides in from the right and exits in reverse. The route also shifts to the left in parallax when another page enters to cover it. (These directions are flipped in environments with a right-to-left reading direction.)

By default, when the created route is replaced by another, the previous route remains in memory. To free all the resources when this is not necessary, set maintainState to false.

The fullscreenDialog property specifies whether the created route is a fullscreen modal dialog. On iOS, those routes animate from the bottom to the top rather than horizontally.

The type T specifies the return type of the route which can be supplied as the route is popped from the stack via Navigator.transitionDelegate by providing the optional result argument to the RouteTransitionRecord.markForPop in the TransitionDelegate.resolve.

See also:



MaterialPage({@required Widget child, bool maintainState: true, bool fullscreenDialog: false, LocalKey key, String name, Object arguments})
Creates a material page.


arguments Object
The arguments passed to this route. [...]
final, inherited
child Widget
The content to be shown in the Route created by this page.
fullscreenDialog bool
Whether this page route is a full-screen dialog. [...]
hashCode int
The hash code for this object. [...]
read-only, inherited
key LocalKey
The key associated with this page. [...]
final, inherited
maintainState bool
Whether the route should remain in memory when it is inactive. [...]
name String
The name of the route (e.g., "/settings"). [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


canUpdate(Page other) bool
Whether this page can be updated with the other page. [...]
copyWith({String name, Object arguments}) RouteSettings
Creates a copy of this route settings object with the given fields replaced with the new values.
createRoute(BuildContext context) Route<T>
Creates the Route that corresponds to this page. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(Object other) bool
The equality operator. [...]