pub struct AnyModalRoute { /* private fields */ }Expand description
Erased ModalRoute: what Dart’s ModalRoute.of(context) returns and what
route is ModalRoute<dynamic> produces.
Implementations§
Source§impl AnyModalRoute
impl AnyModalRoute
Sourcepub fn upgrade(self, app: &App) -> Option<Retained<AnyModalRoute>>
pub fn upgrade(self, app: &App) -> Option<Retained<AnyModalRoute>>
A reference while something still keeps the object, None once it is freed or
its last keeper has let go; see Handle::upgrade.
Sourcepub fn keep(self, app: &App) -> Retained<AnyModalRoute>
pub fn keep(self, app: &App) -> Retained<AnyModalRoute>
A reference to an object something is known to keep; see
Handle::keep.
Source§impl AnyModalRoute
impl AnyModalRoute
Sourcepub fn animations(self, app: &App) -> (AnimationRef<f64>, AnimationRef<f64>)
pub fn animations(self, app: &App) -> (AnimationRef<f64>, AnimationRef<f64>)
The route’s animation and
secondary_animation, kept, for the builders that take them.
§Panics
Before the route is installed.
Sourcepub fn of(app: &mut App, context: BuildContext) -> Option<AnyModalRoute>
pub fn of(app: &mut App, context: BuildContext) -> Option<AnyModalRoute>
Returns the modal route most closely associated with the given context.
Returns None if the given context is not associated with a modal route.
The given BuildContext will be rebuilt if the state of the route changes while it is
visible (specifically, if AnyRoute::is_current or can_pop change
value).
Dart’s ModalRoute.of(context).
Sourcepub fn is_current_of(app: &mut App, context: BuildContext) -> Option<bool>
pub fn is_current_of(app: &mut App, context: BuildContext) -> Option<bool>
Returns AnyRoute::is_current for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn can_pop_of(app: &mut App, context: BuildContext) -> Option<bool>
pub fn can_pop_of(app: &mut App, context: BuildContext) -> Option<bool>
Returns can_pop for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn settings_of(
app: &mut App,
context: BuildContext,
) -> Option<RouteSettingsRef>
pub fn settings_of( app: &mut App, context: BuildContext, ) -> Option<RouteSettingsRef>
Returns AnyRoute::settings for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn is_active_of(app: &mut App, context: BuildContext) -> Option<bool>
pub fn is_active_of(app: &mut App, context: BuildContext) -> Option<bool>
Returns AnyRoute::is_active for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn is_first_of(app: &mut App, context: BuildContext) -> Option<bool>
pub fn is_first_of(app: &mut App, context: BuildContext) -> Option<bool>
Returns AnyRoute::is_first for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn opaque_of(app: &mut App, context: BuildContext) -> Option<bool>
pub fn opaque_of(app: &mut App, context: BuildContext) -> Option<bool>
Returns opaque for the modal route most closely associated with the
given context, creating a dependency on that aspect.
Sourcepub fn pop_disposition_of(
app: &mut App,
context: BuildContext,
) -> Option<RoutePopDisposition>
pub fn pop_disposition_of( app: &mut App, context: BuildContext, ) -> Option<RoutePopDisposition>
Returns AnyRoute::pop_disposition for the modal route most closely associated with
the given context, creating a dependency on that aspect.
Sourcepub fn with_name(name: &str) -> RoutePredicate
pub fn with_name(name: &str) -> RoutePredicate
Returns a predicate that is true if the route has the specified name and if popping the
route will not yield the same route, i.e. if the route’s
Route::will_handle_pop_internally is false.
This function is typically used with NavigatorState::pop_until.
Sourcepub fn as_transition_route(self) -> AnyTransitionRoute
pub fn as_transition_route(self) -> AnyTransitionRoute
This modal route as the erased AnyTransitionRoute.
Sourcepub fn barrier_dismissible(self, app: &App) -> bool
pub fn barrier_dismissible(self, app: &App) -> bool
Sourcepub fn barrier_color(self, app: &App) -> Option<Color>
pub fn barrier_color(self, app: &App) -> Option<Color>
Sourcepub fn barrier_label(self, app: &App) -> Option<String>
pub fn barrier_label(self, app: &App) -> Option<String>
Sourcepub fn maintain_state(self, app: &App) -> bool
pub fn maintain_state(self, app: &App) -> bool
Sourcepub fn offstage(self, app: &App) -> bool
pub fn offstage(self, app: &App) -> bool
See ModalRoute::offstage.
Sourcepub fn set_offstage(self, app: &mut App, value: bool)
pub fn set_offstage(self, app: &mut App, value: bool)
Sourcepub fn secondary_animation(self, app: &App) -> Option<AnyAnimation<f64>>
pub fn secondary_animation(self, app: &App) -> Option<AnyAnimation<f64>>
Sourcepub fn delegated_transition(
self,
app: &App,
) -> Option<DelegatedTransitionBuilder>
pub fn delegated_transition( self, app: &App, ) -> Option<DelegatedTransitionBuilder>
Sourcepub fn can_pop(self, app: &mut App) -> bool
pub fn can_pop(self, app: &mut App) -> bool
See ModalRoute::can_pop.
Sourcepub fn implies_app_bar_dismissal(self, app: &App) -> bool
pub fn implies_app_bar_dismissal(self, app: &App) -> bool
Sourcepub fn fullscreen_dialog(self, app: &App) -> bool
pub fn fullscreen_dialog(self, app: &App) -> bool
Sourcepub fn pop_gesture_in_progress(self, app: &App) -> bool
pub fn pop_gesture_in_progress(self, app: &App) -> bool
Sourcepub fn traversal_edge_behavior(self, app: &App) -> Option<TraversalEdgeBehavior>
pub fn traversal_edge_behavior(self, app: &App) -> Option<TraversalEdgeBehavior>
Sourcepub fn directional_traversal_edge_behavior(
self,
app: &App,
) -> Option<TraversalEdgeBehavior>
pub fn directional_traversal_edge_behavior( self, app: &App, ) -> Option<TraversalEdgeBehavior>
Sourcepub fn storage_bucket(self, app: &App) -> Handle<PageStorageBucket>
pub fn storage_bucket(self, app: &App) -> Handle<PageStorageBucket>
Dart’s ModalRoute._storageBucket.
Sourcepub fn subtree_key(self, app: &App) -> GlobalKey
pub fn subtree_key(self, app: &App) -> GlobalKey
Dart’s ModalRoute._subtreeKey.
Sourcepub fn subtree_context(self, app: &mut App) -> Option<BuildContext>
pub fn subtree_context(self, app: &mut App) -> Option<BuildContext>
Sourcepub fn build_page(
self,
app: &mut App,
context: BuildContext,
animation: AnimationRef<f64>,
secondary_animation: AnimationRef<f64>,
) -> WidgetRef
pub fn build_page( self, app: &mut App, context: BuildContext, animation: AnimationRef<f64>, secondary_animation: AnimationRef<f64>, ) -> WidgetRef
Sourcepub fn build_flexible_transitions(
self,
app: &mut App,
context: BuildContext,
animation: AnimationRef<f64>,
secondary_animation: AnimationRef<f64>,
child: WidgetRef,
) -> WidgetRef
pub fn build_flexible_transitions( self, app: &mut App, context: BuildContext, animation: AnimationRef<f64>, secondary_animation: AnimationRef<f64>, child: WidgetRef, ) -> WidgetRef
Sourcepub fn add_local_history_entry(
self,
app: &mut App,
entry: Ref<LocalHistoryEntry>,
)
pub fn add_local_history_entry( self, app: &mut App, entry: Ref<LocalHistoryEntry>, )
Sourcepub fn remove_local_history_entry(
self,
app: &mut App,
entry: Handle<LocalHistoryEntry>,
)
pub fn remove_local_history_entry( self, app: &mut App, entry: Handle<LocalHistoryEntry>, )
Sourcepub fn register_pop_entry(self, app: &mut App, pop_entry: Rc<dyn PopEntry>)
pub fn register_pop_entry(self, app: &mut App, pop_entry: Rc<dyn PopEntry>)
Sourcepub fn unregister_pop_entry(self, app: &mut App, pop_entry: Rc<dyn PopEntry>)
pub fn unregister_pop_entry(self, app: &mut App, pop_entry: Rc<dyn PopEntry>)
Trait Implementations§
Source§impl Clone for AnyModalRoute
impl Clone for AnyModalRoute
impl Copy for AnyModalRoute
Source§impl Debug for AnyModalRoute
impl Debug for AnyModalRoute
impl Eq for AnyModalRoute
Source§impl From<AnyModalRoute> for AnyRoute
A kept route as a RouteRef, through Retained::erase: Dart’s upcast.
impl From<AnyModalRoute> for AnyRoute
A kept route as a RouteRef, through Retained::erase: Dart’s upcast.
Source§fn from(route: AnyModalRoute) -> AnyRoute
fn from(route: AnyModalRoute) -> AnyRoute
Source§impl From<AnyModalRoute> for AnyTransitionRoute
impl From<AnyModalRoute> for AnyTransitionRoute
Source§fn from(route: AnyModalRoute) -> AnyTransitionRoute
fn from(route: AnyModalRoute) -> AnyTransitionRoute
Source§impl From<AnyModalRoute> for HandleId
impl From<AnyModalRoute> for HandleId
Source§fn from(handle: AnyModalRoute) -> HandleId
fn from(handle: AnyModalRoute) -> HandleId
Source§impl From<AnyPageRoute> for AnyModalRoute
impl From<AnyPageRoute> for AnyModalRoute
Source§fn from(route: AnyPageRoute) -> AnyModalRoute
fn from(route: AnyPageRoute) -> AnyModalRoute
Source§impl<Leaf: ModalRoute> From<Handle<Leaf>> for AnyModalRoute
impl<Leaf: ModalRoute> From<Handle<Leaf>> for AnyModalRoute
Source§fn from(handle: Handle<Leaf>) -> AnyModalRoute
fn from(handle: Handle<Leaf>) -> AnyModalRoute
Source§impl Hash for AnyModalRoute
impl Hash for AnyModalRoute
Source§impl PartialEq for AnyModalRoute
impl PartialEq for AnyModalRoute
Source§impl PartialEq<AnyModalRoute> for &Retained<AnyModalRoute>
impl PartialEq<AnyModalRoute> for &Retained<AnyModalRoute>
Auto Trait Implementations§
impl Forget for AnyModalRoute
impl Freeze for AnyModalRoute
impl Move for AnyModalRoute
impl RefUnwindSafe for AnyModalRoute
impl Send for AnyModalRoute
impl Sync for AnyModalRoute
impl Unpin for AnyModalRoute
impl UnsafeUnpin for AnyModalRoutewhere
NonZeroU32Inner: UnsafeUnpin,
&'static ModalRouteVTable: UnsafeUnpin,
impl UnwindSafe for AnyModalRoute
Blanket Implementations§
Source§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.