Skip to main content

ModalBottomSheetRoute

Struct ModalBottomSheetRoute 

Source
pub struct ModalBottomSheetRoute {
Show 17 fields pub builder: WidgetBuilder, pub captured_themes: Option<CapturedThemes>, pub is_scroll_controlled: bool, pub scroll_control_disabled_max_height_ratio: f64, pub background_color: Option<Color>, pub elevation: Option<f64>, pub shape: Option<ShapeBorderRef>, pub clip_behavior: Option<Clip>, pub constraints: Option<BoxConstraints>, pub modal_barrier_color: Option<Color>, pub is_dismissible: bool, pub enable_drag: bool, pub show_drag_handle: Option<bool>, pub transition_animation_controller: Option<Ref<AnimationController>>, pub use_safe_area: bool, pub sheet_animation_style: Option<AnimationStyle>, pub barrier_on_tap_hint: Option<String>, /* private fields */
}
Expand description

A route that represents a Material Design modal bottom sheet.

A modal bottom sheet is an alternative to a menu or a dialog and prevents the user from interacting with the rest of the app.

A closely related widget is a persistent bottom sheet, which shows information that supplements the primary content of the app without preventing the user from interacting with the app. Persistent bottom sheets can be created and displayed with the ShowBottomSheet builder or the ScaffoldState::show_bottom_sheet method.

The is_scroll_controlled parameter specifies whether this is a route for a bottom sheet that will utilize DraggableScrollableSheet. Consider setting this parameter to true if this bottom sheet has a scrollable child, such as a ListView or a GridView, to have the bottom sheet be draggable.

The is_dismissible parameter specifies whether the bottom sheet will be dismissed when user taps on the scrim.

The enable_drag parameter specifies whether the bottom sheet can be dragged up and down and dismissed by swiping downwards.

The use_safe_area parameter specifies whether the sheet will avoid system intrusions on the top, left, and right. If false, no SafeArea is added; and MediaQuery::remove_padding is applied to the top, so that system intrusions at the top will not be avoided by a SafeArea inside the bottom sheet either. Defaults to false.

The optional background_color, elevation, shape, clip_behavior, constraints and transition_animation_controller parameters can be passed in to customize the appearance and behavior of modal bottom sheets (see the documentation for these on BottomSheet for more details).

The transition_animation_controller controls the bottom sheet’s entrance and exit animations. It’s up to the owner of the controller to call AnimationController::dispose when the controller is no longer needed.

The optional settings parameter sets the RouteSettings of the modal bottom sheet sheet. This is particularly useful in the case that a user wants to observe PopupRoutes within a NavigatorObserver.

See also:

Fields§

§builder: WidgetBuilder

A builder for the contents of the sheet.

The bottom sheet will wrap the widget produced by this builder in a Material widget.

§captured_themes: Option<CapturedThemes>

Stores a list of captured InheritedThemes that are wrapped around the bottom sheet.

Consider setting this attribute when the ModalBottomSheetRoute is created through Navigator::push and its friends.

§is_scroll_controlled: bool

Specifies whether this is a route for a bottom sheet that will utilize DraggableScrollableSheet.

Consider setting this parameter to true if this bottom sheet has a scrollable child, such as a ListView or a GridView, to have the bottom sheet be draggable.

§scroll_control_disabled_max_height_ratio: f64

The max height constraint ratio for the bottom sheet when is_scroll_controlled is set to false, no ratio will be applied when is_scroll_controlled is set to true.

Defaults to 9 / 16.

§background_color: Option<Color>

The bottom sheet’s background color.

Defines the bottom sheet’s Material.color.

If this property is not provided, it falls back to Material’s default.

§elevation: Option<f64>

The z-coordinate at which to place this material relative to its parent.

This controls the size of the shadow below the material.

Defaults to 0, must not be negative.

§shape: Option<ShapeBorderRef>

The shape of the bottom sheet.

Defines the bottom sheet’s Material.shape.

If this property is not provided, it falls back to Material’s default.

§clip_behavior: Option<Clip>

The content will be clipped (or not) according to this option.

Defines the bottom sheet’s Material.clipBehavior.

Use this property to enable clipping of content when the bottom sheet has a custom shape and the content can extend past this shape. For example, a bottom sheet with rounded corners and an edge-to-edge Image at the top.

If this property is null, the BottomSheetThemeData::clip_behavior of ThemeData.bottomSheetTheme is used. If that’s null, the behavior defaults to Clip::None will be Clip::None.

§constraints: Option<BoxConstraints>

Defines minimum and maximum sizes for a BottomSheet.

If null, the ambient ThemeData.bottomSheetTheme’s BottomSheetThemeData::constraints will be used. If that is null and ThemeData.useMaterial3 is true, then the bottom sheet will have a max width of 640dp. If ThemeData.useMaterial3 is false, then the bottom sheet’s size will be constrained by its parent (usually a Scaffold). In this case, consider limiting the width by setting smaller constraints for large screens.

If constraints are specified (either in this property or in the theme), the bottom sheet will be aligned to the bottom-center of the available space. Otherwise, no alignment is applied.

§modal_barrier_color: Option<Color>

Specifies the color of the modal barrier that darkens everything below the bottom sheet.

Defaults to Colors.black54 if not provided.

§is_dismissible: bool

Specifies whether the bottom sheet will be dismissed when user taps on the scrim.

If true, the bottom sheet will be dismissed when user taps on the scrim.

Defaults to true.

§enable_drag: bool

Specifies whether the bottom sheet can be dragged up and down and dismissed by swiping downwards.

If true, the bottom sheet can be dragged up and down and dismissed by swiping downwards.

This applies to the content below the drag handle, if showDragHandle is true.

Defaults is true.

§show_drag_handle: Option<bool>

Specifies whether a drag handle is shown.

The drag handle appears at the top of the bottom sheet. The default color is ColorScheme.onSurfaceVariant with an opacity of 0.4 and can be customized using dragHandleColor. The default size is Size(32,4) and can be customized with dragHandleSize.

If null, then the value of BottomSheetThemeData::show_drag_handle is used. If that is also null, defaults to false.

§transition_animation_controller: Option<Ref<AnimationController>>

The animation controller that controls the bottom sheet’s entrance and exit animations.

The BottomSheet widget will manipulate the position of this animation, it is not just a passive observer.

§use_safe_area: bool

Whether to avoid system intrusions on the top, left, and right.

If true, a SafeArea is inserted to keep the bottom sheet away from system intrusions at the top, left, and right sides of the screen.

If false, the bottom sheet will extend through any system intrusions at the top, left, and right.

If false, then moreover MediaQuery::remove_padding will be used to remove top padding, so that a SafeArea widget inside the bottom sheet will have no effect at the top edge. If this is undesired, consider setting use_safe_area to true. Alternatively, wrap the SafeArea in a MediaQuery that restates an ambient MediaQueryData from outside builder.

In either case, the bottom sheet extends all the way to the bottom of the screen, including any system intrusions.

The default is false.

§sheet_animation_style: Option<AnimationStyle>

Used to override the modal bottom sheet animation duration and reverse animation duration.

If AnimationStyle.duration is provided, it will be used to override the modal bottom sheet animation duration in the underlying BottomSheet::create_animation_controller.

If AnimationStyle.reverseDuration is provided, it will be used to override the modal bottom sheet reverse animation duration in the underlying BottomSheet::create_animation_controller.

To disable the modal bottom sheet animation, use AnimationStyle.noAnimation.

§barrier_on_tap_hint: Option<String>

The semantic hint text that informs users what will happen if they tap on the widget. Announced in the format of ‘Double tap to …’.

If the field is null, the default hint will be used, which results in announcement of ‘Double tap to activate’.

See also:

Implementations§

Source§

impl ModalBottomSheetRoute

Source

pub fn new( app: &mut App, builder: WidgetBuilder, is_scroll_controlled: bool, ) -> Ref<ModalBottomSheetRoute>

A modal bottom sheet route; Dart’s optional arguments are the setters.

Source

pub fn captured_themes( self: Ref<Self>, app: &mut App, captured_themes: CapturedThemes, ) -> Ref<Self>

Dart ModalBottomSheetRoute(capturedThemes:).

Source

pub fn barrier_label( self: Ref<Self>, app: &mut App, barrier_label: String, ) -> Ref<Self>

Dart ModalBottomSheetRoute(barrierLabel:).

Source

pub fn barrier_on_tap_hint( self: Ref<Self>, app: &mut App, barrier_on_tap_hint: String, ) -> Ref<Self>

Dart ModalBottomSheetRoute(barrierOnTapHint:).

Source

pub fn background_color( self: Ref<Self>, app: &mut App, background_color: Color, ) -> Ref<Self>

Dart ModalBottomSheetRoute(backgroundColor:).

Source

pub fn elevation(self: Ref<Self>, app: &mut App, elevation: f64) -> Ref<Self>

Dart ModalBottomSheetRoute(elevation:).

Source

pub fn shape( self: Ref<Self>, app: &mut App, shape: impl Into<ShapeBorderRef>, ) -> Ref<Self>

Dart ModalBottomSheetRoute(shape:).

Source

pub fn clip_behavior( self: Ref<Self>, app: &mut App, clip_behavior: Clip, ) -> Ref<Self>

Dart ModalBottomSheetRoute(clipBehavior:).

Source

pub fn constraints( self: Ref<Self>, app: &mut App, constraints: BoxConstraints, ) -> Ref<Self>

Dart ModalBottomSheetRoute(constraints:).

Source

pub fn modal_barrier_color( self: Ref<Self>, app: &mut App, modal_barrier_color: Color, ) -> Ref<Self>

Dart ModalBottomSheetRoute(modalBarrierColor:).

Source

pub fn is_dismissible( self: Ref<Self>, app: &mut App, is_dismissible: bool, ) -> Ref<Self>

Dart ModalBottomSheetRoute(isDismissible:).

Source

pub fn enable_drag( self: Ref<Self>, app: &mut App, enable_drag: bool, ) -> Ref<Self>

Dart ModalBottomSheetRoute(enableDrag:).

Source

pub fn show_drag_handle( self: Ref<Self>, app: &mut App, show_drag_handle: bool, ) -> Ref<Self>

Dart ModalBottomSheetRoute(showDragHandle:).

Source

pub fn scroll_control_disabled_max_height_ratio( self: Ref<Self>, app: &mut App, scroll_control_disabled_max_height_ratio: f64, ) -> Ref<Self>

Dart ModalBottomSheetRoute(scrollControlDisabledMaxHeightRatio:).

Source

pub fn settings( self: Ref<Self>, app: &mut App, settings: RouteSettingsRef, ) -> Ref<Self>

Dart ModalBottomSheetRoute(settings:).

Source

pub fn request_focus( self: Ref<Self>, app: &mut App, request_focus: bool, ) -> Ref<Self>

Dart ModalBottomSheetRoute(requestFocus:).

Source

pub fn transition_animation_controller( self: Ref<Self>, app: &mut App, transition_animation_controller: Ref<AnimationController>, ) -> Ref<Self>

Dart ModalBottomSheetRoute(transitionAnimationController:).

Source

pub fn use_safe_area( self: Ref<Self>, app: &mut App, use_safe_area: bool, ) -> Ref<Self>

Dart ModalBottomSheetRoute(useSafeArea:).

Source

pub fn sheet_animation_style( self: Ref<Self>, app: &mut App, sheet_animation_style: AnimationStyle, ) -> Ref<Self>

Dart ModalBottomSheetRoute(sheetAnimationStyle:).

Trait Implementations§

Source§

impl LocalHistoryRoute for ModalBottomSheetRoute

Source§

fn local_history_route_data( self: Handle<Self>, app: &App, ) -> &LocalHistoryRouteData

Dart’s LocalHistoryRoute fields, held under the field local_history (local_history_route_accessors!).
Source§

fn local_history_route_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut LocalHistoryRouteData

Source§

fn add_local_history_entry( self: Handle<Self>, app: &mut App, entry: Retained<Handle<LocalHistoryEntry>>, )

Adds a local history entry to this route. Read more
Source§

fn remove_local_history_entry( self: Handle<Self>, app: &mut App, entry: Handle<LocalHistoryEntry>, )

Removes a local history entry from this route. Read more
Source§

fn will_pop(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Dart’s LocalHistoryRoute.willPop.
Source§

fn pop_disposition(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Dart’s LocalHistoryRoute.popDisposition.
Source§

fn did_pop( self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>, ) -> bool

Dart’s LocalHistoryRoute.didPop.
Source§

fn will_handle_pop_internally(self: Handle<Self>, app: &App) -> bool

Dart’s LocalHistoryRoute.willHandlePopInternally.
Source§

impl ModalRoute for ModalBottomSheetRoute

Source§

fn modal_route_data(self: Handle<Self>, app: &App) -> &ModalRouteData

Dart’s ModalRoute fields, held under the field modal_route (modal_route_accessors!).
Source§

fn modal_route_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ModalRouteData

Source§

fn barrier_dismissible(self: Handle<Self>, app: &App) -> bool

Whether you can dismiss this route by tapping the modal barrier. Read more
Source§

fn barrier_label(self: Handle<Self>, app: &App) -> Option<String>

The semantic label used for a dismissible barrier.
Source§

fn barrier_color(self: Handle<Self>, app: &App) -> Option<Color>

The color to use for the modal barrier. If this is None, the barrier will be transparent. Read more
Source§

fn maintain_state(self: Handle<Self>, app: &App) -> bool

Whether the route should remain in memory when it is inactive. Read more
Source§

fn build_page( self: Handle<Self>, app: &mut App, context: BuildContext, animation: AnimationRef<f64>, secondary_animation: AnimationRef<f64>, ) -> WidgetRef

Override this method to build the primary content of this route. Read more
Source§

fn build_modal_barrier( self: Handle<Self>, app: &mut App, context: BuildContext, ) -> WidgetRef

Builds the barrier for this ModalRoute; subclasses can override this method to create their own barrier with customized features such as color or accessibility focus size, and reach this body through ModalRouteBase::build_modal_barrier.
Source§

fn as_modal_route(self: Handle<Self>) -> AnyModalRoute

This route as the erased AnyModalRoute.
Source§

fn set_state(self: Handle<Self>, app: &mut App, change: impl FnOnce(&mut App))

Schedules a call to build_transitions. Read more
Source§

fn build_transitions( self: Handle<Self>, app: &mut App, context: AnyElement, animation: Retained<AnyAnimation<f64>>, secondary_animation: Retained<AnyAnimation<f64>>, child: Rc<dyn Widget>, ) -> Rc<dyn Widget>

Override this method to wrap the child with one or more transition widgets that define how the route arrives on and leaves the screen. Read more
Source§

fn delegated_transition( self: Handle<Self>, app: &App, ) -> Option<DelegatedTransitionBuilder>

The DelegatedTransitionBuilder provided to the route below this one in the navigation stack. Read more
Source§

fn build_flexible_transitions( self: Handle<Self>, app: &mut App, context: AnyElement, animation: Retained<AnyAnimation<f64>>, secondary_animation: Retained<AnyAnimation<f64>>, child: Rc<dyn Widget>, ) -> Rc<dyn Widget>

Dart’s _buildFlexibleTransitions: wraps the transitions of this route with the received_transition, when there is one.
Source§

fn install(self: Handle<Self>, app: &mut App)

Dart’s ModalRoute.install.
Source§

fn did_push(self: Handle<Self>, app: &mut App) -> TickerFuture ⓘ

Dart’s ModalRoute.didPush.
Source§

fn did_add(self: Handle<Self>, app: &mut App)

Dart’s ModalRoute.didAdd.
Source§

fn semantics_dismissible(self: Handle<Self>, app: &App) -> bool

Whether the semantics of the modal barrier are included in the semantics tree.
Source§

fn barrier_curve(self: Handle<Self>, app: &App) -> Rc<dyn Curve>

The curve that is used for animating the modal barrier in and out. Read more
Source§

fn pop_gesture_in_progress(self: Handle<Self>, app: &App) -> bool

True if a back gesture (iOS-style back swipe or Android predictive back) is currently underway for this route.
Source§

fn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool

Dart’s ModalRoute.popGestureEnabled.
Source§

fn offstage(self: Handle<Self>, app: &App) -> bool

Whether this route is currently offstage. Read more
Source§

fn set_offstage(self: Handle<Self>, app: &mut App, value: bool)

Sets offstage.
Source§

fn subtree_context(self: Handle<Self>, app: &mut App) -> Option<AnyElement>

The build context for the subtree containing the primary content of this route.
Source§

fn animation(self: Handle<Self>, app: &App) -> Option<AnyAnimation<f64>>

Dart’s ModalRoute.animation.
Source§

fn secondary_animation( self: Handle<Self>, app: &App, ) -> Option<AnyAnimation<f64>>

Dart’s ModalRoute.secondaryAnimation.
Source§

fn pop_disposition(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Dart’s ModalRoute.popDisposition. Read more
Source§

fn on_pop_invoked_with_result( self: Handle<Self>, app: &mut App, did_pop: bool, result: Option<Rc<dyn Any>>, )

Dart’s ModalRoute.onPopInvokedWithResult.
Source§

fn register_pop_entry( self: Handle<Self>, app: &mut App, pop_entry: Rc<dyn PopEntry>, )

Registers the existence of a PopEntry in the route. Read more
Source§

fn unregister_pop_entry( self: Handle<Self>, app: &mut App, pop_entry: Rc<dyn PopEntry>, )

Unregisters a PopEntry in the route’s widget subtree.
Source§

fn maybe_dispatch_navigation_notification(self: Handle<Self>, app: &mut App)

Dart’s _maybeDispatchNavigationNotification.
Source§

fn did_change_previous( self: Handle<Self>, app: &mut App, previous_route: Option<AnyRoute>, )

Dart’s ModalRoute.didChangePrevious.
Source§

fn did_change_next( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

Dart’s ModalRoute.didChangeNext.
Source§

fn did_pop_next(self: Handle<Self>, app: &mut App, next_route: AnyRoute)

Dart’s ModalRoute.didPopNext.
Source§

fn update_received_transition( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

The nextRoute is ModalRoute && canTransitionTo(nextRoute) && … branch both did_change_next and did_pop_next run.
Source§

fn changed_internal_state(self: Handle<Self>, app: &mut App)

Dart’s ModalRoute.changedInternalState.
Source§

fn changed_external_state(self: Handle<Self>, app: &mut App)

Dart’s ModalRoute.changedExternalState.
Source§

fn can_pop(self: Handle<Self>, app: &mut App) -> bool

Whether this route can be popped. Read more
Source§

fn implies_app_bar_dismissal(self: Handle<Self>, app: &App) -> bool

Whether an app bar in the route should automatically add a back button or close button. Read more
Source§

fn fullscreen_dialog(self: Handle<Self>, app: &App) -> bool

Whether this route is a full-screen dialog.
Source§

fn build_modal_barrier_entry( self: Handle<Self>, app: &mut App, context: AnyElement, ) -> Rc<dyn Widget>

Dart’s _buildModalBarrier.
Source§

fn build_modal_scope( self: Handle<Self>, app: &mut App, context: AnyElement, ) -> Rc<dyn Widget>

Dart’s _buildModalScope: the part of the modal scope that does not change from frame to frame, cached so that the amount of building is minimized.
Source§

fn create_overlay_entries( self: Handle<Self>, app: &mut App, ) -> Vec<Retained<Handle<OverlayEntry>>>

Dart’s ModalRoute.createOverlayEntries.
Source§

impl OverlayRoute for ModalBottomSheetRoute

Source§

fn overlay_route_data(self: Handle<Self>, app: &App) -> &OverlayRouteData

Dart’s OverlayRoute fields, held under the field overlay_route (overlay_route_accessors!).
Source§

fn overlay_route_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut OverlayRouteData

Source§

fn create_overlay_entries( self: Handle<Self>, app: &mut App, ) -> Vec<Ref<OverlayEntry>>

Subclasses should override this method to return the builders for the overlay.
Source§

fn finished_when_popped(self: Handle<Self>, app: &App) -> bool

Source§

fn overlay_entries(self: Handle<Self>, app: &App) -> Vec<Handle<OverlayEntry>>

Dart’s OverlayRoute.overlayEntries.
Source§

fn install(self: Handle<Self>, app: &mut App)

Dart’s OverlayRoute.install.
Source§

fn did_pop( self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>, ) -> bool

Dart’s OverlayRoute.didPop.
Source§

fn dispose(self: Handle<Self>, app: &mut App)

Dart’s OverlayRoute.dispose.
Source§

impl PopupRoute for ModalBottomSheetRoute

Source§

fn opaque(self: Handle<Self>, app: &App) -> bool

Dart’s PopupRoute.opaque.
Source§

fn maintain_state(self: Handle<Self>, app: &App) -> bool

Dart’s PopupRoute.maintainState.
Source§

fn allow_snapshotting(self: Handle<Self>, app: &App) -> bool

Dart’s PopupRoute.allowSnapshotting.
Source§

impl PredictiveBackRoute for ModalBottomSheetRoute

Source§

fn pop_gesture_enabled(self: Handle<Self>, app: &mut App) -> bool

Whether a pop gesture can be started by the user for this route.
Source§

fn handle_start_back_gesture(self: Handle<Self>, app: &mut App, progress: f64)

Handles a predictive back gesture starting. Read more
Source§

fn handle_update_back_gesture_progress( self: Handle<Self>, app: &mut App, progress: f64, )

Handles a predictive back gesture updating as the user drags across the screen. Read more
Source§

fn handle_commit_back_gesture(self: Handle<Self>, app: &mut App)

Handles a predictive back gesture ending successfully.
Source§

fn handle_cancel_back_gesture(self: Handle<Self>, app: &mut App)

Handles a predictive back gesture ending in cancellation.
Source§

impl Route for ModalBottomSheetRoute

Source§

fn route_data(self: Handle<Self>, app: &App) -> &RouteData

Dart’s Route fields, held under the field route (route_accessors!).
Source§

fn route_data_mut(self: Handle<Self>, app: &mut App) -> &mut RouteData

Source§

fn as_transition_route(self: Handle<Self>) -> Option<AnyTransitionRoute>

This route as the erased AnyTransitionRoute, when it is a TransitionRoute. Read more
Source§

fn as_modal_route(self: Handle<Self>) -> Option<AnyModalRoute>

This route as the erased AnyModalRoute, when it is a ModalRoute. Read more
Source§

fn overlay_entries(self: Handle<Self>, app: &App) -> Vec<Handle<OverlayEntry>>

The overlay entries of this route. Read more
Source§

fn install(self: Handle<Self>, app: &mut App)

Called when the route is inserted into the navigator. Read more
Source§

fn did_push(self: Handle<Self>, app: &mut App) -> TickerFuture ⓘ

Called after install when the route is pushed onto the navigator. Read more
Source§

fn did_add(self: Handle<Self>, app: &mut App)

Called after install when the route is added to the navigator. Read more
Source§

fn did_replace(self: Handle<Self>, app: &mut App, old_route: Option<AnyRoute>)

Called after install when the route replaced another in the navigator.
Source§

fn will_pop(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Returns whether calling NavigatorState::maybe_pop when this route is current should do anything. Read more
Source§

fn pop_disposition(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Returns whether calling NavigatorState::maybe_pop when this route is current (is_current) should do anything. Read more
Source§

fn on_pop_invoked_with_result( self: Handle<Self>, app: &mut App, did_pop: bool, result: RouteResult, )

Called after a route pop was handled. Read more
Source§

fn will_handle_pop_internally(self: Handle<Self>, app: &App) -> bool

Whether calling did_pop would return false.
Source§

fn did_pop(self: Handle<Self>, app: &mut App, result: RouteResult) -> bool

A request was made to pop this route. If the route can handle it internally (e.g. because it has its own stack of internal state) then return false, otherwise return true (by returning the value of calling Route::did_pop). Returning false will prevent the default behavior of NavigatorState::pop. Read more
Source§

fn did_pop_next(self: Handle<Self>, app: &mut App, next_route: AnyRoute)

The given route, which was above this one, has been popped off the navigator.
Source§

fn did_change_next( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

This route’s next route has changed to the given new route.
Source§

fn did_change_previous( self: Handle<Self>, app: &mut App, previous_route: Option<AnyRoute>, )

This route’s previous route has changed to the given new route.
Source§

fn changed_internal_state(self: Handle<Self>, app: &mut App)

Called whenever the internal state of the route has changed. Read more
Source§

fn changed_external_state(self: Handle<Self>, app: &mut App)

Called whenever the Navigator has updated in some manner that might affect routes, to indicate that the route may wish to rebuild as well.
Source§

fn dispose(self: Handle<Self>, app: &mut App)

Discards any resources used by the object. Read more
Source§

fn as_route(self: Handle<Self>) -> AnyRoute

This route as the erased AnyRoute — what to pass where a Dart API takes a Route. Read more
Source§

fn as_page_route(self: Handle<Self>) -> Option<AnyPageRoute>

This route as the erased AnyPageRoute, when it is a PageRoute. Read more
Source§

fn interface(self: Handle<Self>, id: TypeId) -> Option<Box<dyn Any>>

Dart’s route is SomeMixin for a mixin defined outside this crate: the erased handle of the interface id names, if this type implements it. Read more
Source§

fn current_result(self: Handle<Self>, app: &App) -> Option<Rc<dyn Any>>

When this route is popped (see NavigatorState::pop) if the result isn’t specified or if it is None, this value will be used instead. Read more
Source§

fn did_complete(self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>)

The route was popped or is otherwise being removed somewhat gracefully. Read more
Source§

fn navigator(self: Handle<Self>, app: &App) -> Option<Handle<NavigatorState>>

Source§

fn settings(self: Handle<Self>, app: &App) -> RouteSettingsRef

Source§

fn is_page_based(self: Handle<Self>, app: &App) -> bool

Source§

fn request_focus(self: Handle<Self>, app: &App) -> bool

Source§

fn restoration_scope_id( self: Handle<Self>, app: &App, ) -> Handle<ValueNotifier<Option<String>>>

Source§

fn is_current(self: Handle<Self>, app: &App) -> bool

Source§

fn is_first(self: Handle<Self>, app: &App) -> bool

Source§

fn is_active(self: Handle<Self>, app: &App) -> bool

Source§

fn has_active_route_below(self: Handle<Self>, app: &App) -> bool

Source§

fn popped(self: Handle<Self>, app: &App) -> CompleterFuture<Option<Rc<dyn Any>>> ⓘ

Source§

impl TransitionRoute for ModalBottomSheetRoute

Source§

fn transition_route_data(self: Handle<Self>, app: &App) -> &TransitionRouteData

Dart’s TransitionRoute fields, held under the field transition_route (transition_route_accessors!).
Source§

fn transition_route_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut TransitionRouteData

Source§

fn animation(self: Handle<Self>, app: &App) -> Option<AnyAnimation<f64>>

The animation that drives the route’s transition and the previous route’s forward transition.
Source§

fn secondary_animation( self: Handle<Self>, app: &App, ) -> Option<AnyAnimation<f64>>

The animation for the route being pushed on top of this route. Read more
Source§

fn transition_duration(self: Handle<Self>, app: &mut App) -> Duration

The duration the transition going forwards. Read more
Source§

fn reverse_transition_duration(self: Handle<Self>, app: &mut App) -> Duration

The duration the transition going in reverse. Read more
Source§

fn opaque(self: Handle<Self>, app: &App) -> bool

Whether the route obscures previous routes when the transition is complete. Read more
Source§

fn allow_snapshotting(self: Handle<Self>, app: &App) -> bool

Whether the route transition will prefer to animate a snapshot of the entering and exiting routes.
Source§

fn create_animation_controller( self: Handle<Self>, app: &mut App, ) -> Ref<AnimationController>

Called to create the animation controller that will drive the transitions to this route from the previous one, and back to the previous route from this one. Read more
Source§

fn as_transition_route(self: Handle<Self>) -> AnyTransitionRoute

This route as the erased AnyTransitionRoute.
Source§

fn completed( self: Handle<Self>, app: &App, ) -> CompleterFuture<Option<Rc<dyn Any>>> ⓘ

This future completes only once the transition itself has finished, after the overlay entries have been removed from the navigator’s overlay. Read more
Source§

fn finished_when_popped(self: Handle<Self>, app: &App) -> bool

Dart’s TransitionRoute.finishedWhenPopped. Read more
Source§

fn controller( self: Handle<Self>, app: &App, ) -> Option<Handle<AnimationController>>

The animation controller that the route uses to drive the transitions. Read more
Source§

fn debug_transition_completed(self: Handle<Self>, app: &App) -> bool

Returns true if the transition has completed. Read more
Source§

fn create_animation( self: Handle<Self>, app: &mut App, ) -> Retained<AnyAnimation<f64>>

Called to create the animation that exposes the current progress of the transition controlled by the animation controller created by create_animation_controller.
Source§

fn create_simulation( self: Handle<Self>, app: &mut App, forward: bool, ) -> Option<Box<dyn Simulation>>

Creates the simulation that drives the transition animation for this route. Read more
Source§

fn create_simulation_and_verify( self: Handle<Self>, app: &mut App, forward: bool, ) -> Option<Box<dyn Simulation>>

Dart’s _createSimulationAndVerify.
Source§

fn handle_status_changed( self: Handle<Self>, app: &mut App, status: AnimationStatus, )

Dart’s _handleStatusChanged.
Source§

fn install(self: Handle<Self>, app: &mut App)

Dart’s TransitionRoute.install.
Source§

fn did_push(self: Handle<Self>, app: &mut App) -> TickerFuture ⓘ

Dart’s TransitionRoute.didPush.
Source§

fn did_add(self: Handle<Self>, app: &mut App)

Dart’s TransitionRoute.didAdd.
Source§

fn did_replace(self: Handle<Self>, app: &mut App, old_route: Option<AnyRoute>)

Dart’s TransitionRoute.didReplace.
Source§

fn did_pop( self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>, ) -> bool

Dart’s TransitionRoute.didPop.
Source§

fn did_pop_next(self: Handle<Self>, app: &mut App, next_route: AnyRoute)

Dart’s TransitionRoute.didPopNext.
Source§

fn did_change_next( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

Dart’s TransitionRoute.didChangeNext.
Source§

fn update_secondary_animation( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

Dart’s _updateSecondaryAnimation.
Source§

fn set_secondary_animation( self: Handle<Self>, app: &mut App, animation: Option<Retained<AnyAnimation<f64>>>, disposed: Option<CompleterFuture<Option<Rc<dyn Any>>>>, )

Dart’s _setSecondaryAnimation.
Source§

fn can_transition_to( self: Handle<Self>, app: &App, next_route: AnyTransitionRoute, ) -> bool

Returns true if this route supports a transition animation that runs when next_route is pushed on top of it or when next_route is popped off of it. Read more
Source§

fn can_transition_from( self: Handle<Self>, app: &App, previous_route: AnyTransitionRoute, ) -> bool

Returns true if previous_route should animate when this route is pushed on top of it or when this route is popped off of it. Read more
Source§

fn handle_start_back_gesture(self: Handle<Self>, app: &mut App, progress: f64)

Dart’s TransitionRoute.handleStartBackGesture.
Source§

fn handle_update_back_gesture_progress( self: Handle<Self>, app: &mut App, progress: f64, )

Dart’s TransitionRoute.handleUpdateBackGestureProgress.
Source§

fn handle_cancel_back_gesture(self: Handle<Self>, app: &mut App)

Dart’s TransitionRoute.handleCancelBackGesture.
Source§

fn handle_commit_back_gesture(self: Handle<Self>, app: &mut App)

Dart’s TransitionRoute.handleCommitBackGesture.
Source§

fn handle_drag_end(self: Handle<Self>, app: &mut App, animate_forward: bool)

Dart’s _handleDragEnd.
Source§

fn dispose(self: Handle<Self>, app: &mut App)

Dart’s TransitionRoute.dispose.
Source§

fn debug_label(self: Handle<Self>) -> String

A short description of this route useful for debugging.

Auto Trait Implementations§

§

impl !RefUnwindSafe for ModalBottomSheetRoute

§

impl !Send for ModalBottomSheetRoute

§

impl !Sync for ModalBottomSheetRoute

§

impl !UnwindSafe for ModalBottomSheetRoute

§

impl Forget for ModalBottomSheetRoute

§

impl Freeze for ModalBottomSheetRoute
where NonZero<u32>: Freeze, PhantomData<fn() -> NavigatorState>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const RcInner<dyn Any> is !null: Freeze, PhantomData<RcInner<dyn Any>>: Freeze, *const RcInner<dyn Page> is !null: Freeze, PhantomData<RcInner<dyn Page>>: Freeze, PhantomData<fn() -> ValueNotifier<Option<String>>>: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, *const RcInner<Shared<Option<Rc<dyn Any>>>> is !null: Freeze, PhantomData<RcInner<Shared<Option<Rc<dyn Any>>>>>: Freeze, PhantomData<Retained<Handle<OverlayEntry>>>: Freeze, &'static AnimationVTable<f64>: Freeze, PhantomData<fn() -> AnimationController>: Freeze, PhantomData<fn() -> ProxyAnimation>: Freeze, *const RcInner<dyn Fn(&mut App)> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze, PhantomData<Retained<Handle<LocalHistoryEntry>>>: Freeze, *const ArcInner<ImageFilter> is !null: Freeze, PhantomData<ArcInner<ImageFilter>>: Freeze, *const ArcInner<RuntimeEffect> is !null: Freeze, PhantomData<ArcInner<RuntimeEffect>>: Freeze, *const ArcInner<[u8]> is !null: Freeze, PhantomData<ArcInner<[u8]>>: Freeze, PhantomData<EffectImage>: Freeze, PhantomData<(String, f64)>: Freeze, *const RcInner<ImageFilterConfig> is !null: Freeze, PhantomData<RcInner<ImageFilterConfig>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, bool, Option<&Rc<dyn Widget>>) -> Option<Rc<dyn Widget>>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, bool, Option<&Rc<dyn Widget>>) -> Option<Rc<dyn Widget>>>>: Freeze, *const (): Freeze, PhantomData<Rc<dyn PopEntry>>: Freeze, *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, PhantomData<fn() -> PageStorageBucket>: Freeze, PhantomData<fn() -> OverlayEntry>: Freeze, *const RcInner<dyn Widget> is !null: Freeze, PhantomData<RcInner<dyn Widget>>: Freeze, *const RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>> is !null: Freeze, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>>: Freeze, PhantomData<Rc<dyn Widget>>: Freeze, *const RcInner<dyn ShapeBorder> is !null: Freeze, PhantomData<RcInner<dyn ShapeBorder>>: Freeze, *const RcInner<dyn Curve> is !null: Freeze, PhantomData<RcInner<dyn Curve>>: Freeze, PhantomData<fn() -> ValueNotifier<EdgeInsets>>: Freeze,

§

impl Move for ModalBottomSheetRoute

§

impl Unpin for ModalBottomSheetRoute
where NonZero<u32>: Unpin, *const u8 is !null: Unpin, Rc<dyn Any>: Unpin, Rc<dyn Page>: Unpin, Rc<Keep>: Unpin, Rc<Shared<Option<Rc<dyn Any>>>>: Unpin, &'static AnimationVTable<f64>: Unpin, Rc<dyn Fn(&mut App)>: Unpin, Arc<ImageFilter>: Unpin, Arc<RuntimeEffect>: Unpin, Arc<[u8]>: Unpin, Arc<ImageInner>: Unpin, Rc<ImageFilterConfig>: Unpin, Rc<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, bool, Option<&Rc<dyn Widget>>) -> Option<Rc<dyn Widget>>>: Unpin, *const (): Unpin, Rc<dyn PopEntry>: Unpin, Rc<dyn Key>: Unpin, Rc<dyn Widget>: Unpin, Rc<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>: Unpin, Rc<dyn ShapeBorder>: Unpin, Rc<dyn Curve>: Unpin,

§

impl UnsafeUnpin for ModalBottomSheetRoute
where NonZeroU32Inner: UnsafeUnpin, PhantomData<fn() -> NavigatorState>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const RcInner<dyn Any> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Any>>: UnsafeUnpin, *const RcInner<dyn Page> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Page>>: UnsafeUnpin, PhantomData<fn() -> ValueNotifier<Option<String>>>: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, *const RcInner<Shared<Option<Rc<dyn Any>>>> is !null: UnsafeUnpin, PhantomData<RcInner<Shared<Option<Rc<dyn Any>>>>>: UnsafeUnpin, PhantomData<Retained<Handle<OverlayEntry>>>: UnsafeUnpin, &'static AnimationVTable<f64>: UnsafeUnpin, PhantomData<fn() -> AnimationController>: UnsafeUnpin, PhantomData<fn() -> ProxyAnimation>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin, PhantomData<Retained<Handle<LocalHistoryEntry>>>: UnsafeUnpin, *const ArcInner<ImageFilter> is !null: UnsafeUnpin, PhantomData<ArcInner<ImageFilter>>: UnsafeUnpin, *const ArcInner<RuntimeEffect> is !null: UnsafeUnpin, PhantomData<ArcInner<RuntimeEffect>>: UnsafeUnpin, *const ArcInner<[u8]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u8]>>: UnsafeUnpin, PhantomData<EffectImage>: UnsafeUnpin, PhantomData<(String, f64)>: UnsafeUnpin, *const RcInner<ImageFilterConfig> is !null: UnsafeUnpin, PhantomData<RcInner<ImageFilterConfig>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, bool, Option<&Rc<dyn Widget>>) -> Option<Rc<dyn Widget>>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement, Retained<AnyAnimation<f64>>, Retained<AnyAnimation<f64>>, bool, Option<&Rc<dyn Widget>>) -> Option<Rc<dyn Widget>>>>: UnsafeUnpin, *const (): UnsafeUnpin, PhantomData<Rc<dyn PopEntry>>: UnsafeUnpin, *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, PhantomData<fn() -> PageStorageBucket>: UnsafeUnpin, PhantomData<fn() -> OverlayEntry>: UnsafeUnpin, *const RcInner<dyn Widget> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Widget>>: UnsafeUnpin, *const RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Fn(&mut App, AnyElement) -> Rc<dyn Widget>>>: UnsafeUnpin, PhantomData<Rc<dyn Widget>>: UnsafeUnpin, *const RcInner<dyn ShapeBorder> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ShapeBorder>>: UnsafeUnpin, *const RcInner<dyn Curve> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Curve>>: UnsafeUnpin, PhantomData<fn() -> ValueNotifier<EdgeInsets>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<R> ModalRouteBase for R
where R: ModalRoute,

Source§

fn build_modal_barrier( self: Handle<Self>, app: &mut App, context: AnyElement, ) -> Rc<dyn Widget>

Dart’s ModalRoute.buildModalBarrier.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R> RouteBase for R
where R: Route,

Source§

fn overlay_entries(self: Handle<Self>, app: &App) -> Vec<Handle<OverlayEntry>>

Dart’s Route.overlayEntries.
Source§

fn install(self: Handle<Self>, app: &mut App)

Dart’s Route.install.
Source§

fn did_push(self: Handle<Self>, app: &mut App) -> TickerFuture ⓘ

Dart’s Route.didPush.
Source§

fn did_add(self: Handle<Self>, app: &mut App)

Dart’s Route.didAdd.
Source§

fn did_replace(self: Handle<Self>, app: &mut App, old_route: Option<AnyRoute>)

Dart’s Route.didReplace.
Source§

fn will_pop(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Dart’s Route.willPop.
Source§

fn pop_disposition(self: Handle<Self>, app: &mut App) -> RoutePopDisposition

Dart’s Route.popDisposition.
Source§

fn on_pop_invoked_with_result( self: Handle<Self>, app: &mut App, did_pop: bool, result: Option<Rc<dyn Any>>, )

Dart’s Route.onPopInvokedWithResult.
Source§

fn will_handle_pop_internally(self: Handle<Self>, app: &App) -> bool

Dart’s Route.willHandlePopInternally.
Source§

fn current_result(self: Handle<Self>, app: &App) -> Option<Rc<dyn Any>>

Dart’s Route.currentResult.
Source§

fn did_pop( self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>, ) -> bool

Dart’s Route.didPop.
Source§

fn did_complete(self: Handle<Self>, app: &mut App, result: Option<Rc<dyn Any>>)

Dart’s Route.didComplete.
Source§

fn did_pop_next(self: Handle<Self>, app: &mut App, next_route: AnyRoute)

Dart’s Route.didPopNext.
Source§

fn did_change_next( self: Handle<Self>, app: &mut App, next_route: Option<AnyRoute>, )

Dart’s Route.didChangeNext.
Source§

fn did_change_previous( self: Handle<Self>, app: &mut App, previous_route: Option<AnyRoute>, )

Dart’s Route.didChangePrevious.
Source§

fn changed_internal_state(self: Handle<Self>, app: &mut App)

Dart’s Route.changedInternalState.
Source§

fn changed_external_state(self: Handle<Self>, app: &mut App)

Dart’s Route.changedExternalState.
Source§

fn dispose(self: Handle<Self>, app: &mut App)

Dart’s Route.dispose.
Source§

impl<T> TransitionRouteBase for T
where T: TransitionRoute,

Source§

fn create_animation( self: Handle<Self>, app: &mut App, ) -> Retained<AnyAnimation<f64>>

TransitionRoute.createAnimation: the controller itself, as an animation.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>