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
impl HeroController
Sourcepub fn new(app: &mut App) -> Ref<HeroController>
pub fn new(app: &mut App) -> Ref<HeroController>
Creates a hero controller; Dart’s optional named argument is the setter.
Sourcepub fn create_rect_tween(
self: Ref<Self>,
app: &mut App,
create_rect_tween: CreateRectTween,
) -> Ref<Self>
pub fn create_rect_tween( self: Ref<Self>, app: &mut App, create_rect_tween: CreateRectTween, ) -> Ref<Self>
Dart HeroController(createRectTween:).
Trait Implementations§
Dart’s
NavigatorObserver._navigators entry, held under the field navigator_observer
(navigator_observer_accessors!).Source§fn did_change_top(
self: Handle<Self>,
app: &mut App,
top_route: AnyRoute,
previous_top_route: Option<AnyRoute>,
)
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>,
)
fn did_start_user_gesture( self: Handle<Self>, app: &mut App, route: AnyRoute, previous_route: Option<AnyRoute>, )
Source§fn did_stop_user_gesture(self: Handle<Self>, app: &mut App)
fn did_stop_user_gesture(self: Handle<Self>, app: &mut App)
Source§fn as_observer(self: Handle<Self>) -> AnyNavigatorObserver
fn as_observer(self: Handle<Self>) -> AnyNavigatorObserver
This observer as the erased
AnyNavigatorObserver.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>,
)
fn did_push( self: Handle<Self>, app: &mut App, route: AnyRoute, previous_route: Option<AnyRoute>, )
Source§fn did_pop(
self: Handle<Self>,
app: &mut App,
route: AnyRoute,
previous_route: Option<AnyRoute>,
)
fn did_pop( self: Handle<Self>, app: &mut App, route: AnyRoute, previous_route: Option<AnyRoute>, )
Auto Trait Implementations§
impl !RefUnwindSafe for HeroController
impl !Send for HeroController
impl !Sync for HeroController
impl !UnwindSafe for HeroController
impl Forget for HeroController
impl Freeze for HeroControllerwhere
NonZero<u32>: Freeze,
PhantomData<fn() -> NavigatorState>: Freeze,
*const RcInner<dyn Fn(&mut App, Option<Rect>, Option<Rect>) -> Rc<dyn RectTweenObject>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, Option<Rect>, Option<Rect>) -> Rc<dyn RectTweenObject>>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<Rc<dyn AnyEq>, Retained<Handle<HeroFlight>>>>: Freeze,
impl Move for HeroController
impl Unpin for HeroController
impl UnsafeUnpin for HeroControllerwhere
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> NavigatorState>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, Option<Rect>, Option<Rect>) -> Rc<dyn RectTweenObject>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, Option<Rect>, Option<Rect>) -> Rc<dyn RectTweenObject>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<Rc<dyn AnyEq>, Retained<Handle<HeroFlight>>>>: UnsafeUnpin,
Blanket Implementations§
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
Mutably borrows from an owned value. Read more