Skip to main content

HeroController

Struct HeroController 

Source
pub struct HeroController {
    pub create_rect_tween: Option<CreateRectTween>,
    /* private fields */
}
Expand description

A Navigator observer that manages Hero transitions.

An instance of HeroController should be used in Navigator::observers.

Fields§

§create_rect_tween: Option<CreateRectTween>

Used to create rect tweens that interpolate the position of heroes in flight.

If None, the controller uses a linear RectTween.

Implementations§

Source§

impl HeroController

Source

pub fn new(app: &mut App) -> Ref<HeroController>

Creates a hero controller; Dart’s optional named argument is the setter.

Source

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

Dart HeroController(createRectTween:).

Source

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

Releases resources.

Trait Implementations§

Source§

impl NavigatorObserver for HeroController

Source§

fn navigator_observer_data( self: Handle<Self>, app: &App, ) -> &NavigatorObserverData

Dart’s NavigatorObserver._navigators entry, held under the field navigator_observer (navigator_observer_accessors!).
Source§

fn navigator_observer_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut NavigatorObserverData

Source§

fn did_change_top( self: Handle<Self>, app: &mut App, top_route: AnyRoute, previous_top_route: Option<AnyRoute>, )

The top most route has changed. Read more
Source§

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

The Navigator’s routes are being moved by a user gesture. Read more
Source§

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

User gesture is no longer controlling the Navigator. Read more
Source§

fn as_observer(self: Handle<Self>) -> AnyNavigatorObserver

This observer as the erased AnyNavigatorObserver.
Source§

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

The navigator that the observer is observing, if any.
Source§

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

The Navigator pushed route. Read more
Source§

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

The Navigator popped route. Read more
Source§

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

The Navigator removed route. Read more
Source§

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

The Navigator replaced old_route with new_route.

Auto Trait Implementations§

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<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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>