pub struct TabBarScrollController { /* private fields */ }Expand description
The ScrollController for a TabBar widget.
Implementations§
Source§impl TabBarScrollController
impl TabBarScrollController
Sourcepub fn new(app: &mut App) -> Ref<TabBarScrollController>
pub fn new(app: &mut App) -> Ref<TabBarScrollController>
Creates a scroll controller for a TabBar, with Dart’s ScrollController defaults.
Sourcepub fn debug_check_has_tab_bar_state(self: Handle<Self>, app: &App) -> bool
pub fn debug_check_has_tab_bar_state(self: Handle<Self>, app: &App) -> bool
Asserts that this controller is currently attached to a TabBar’s State.
To invoke this function, wrap it in an assert:
debug_assert!(controller.debug_check_has_tab_bar_state(app)).
Does nothing if asserts are disabled. Always returns true.
Trait Implementations§
Source§impl ChangeNotifier for TabBarScrollController
impl ChangeNotifier for TabBarScrollController
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
Runs before the listener is stored. Dart overrides of
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
Runs after the listener is removed. Dart overrides of
removeListener that
work after super.removeListener go here.Source§impl ScrollControllerLeaf for TabBarScrollController
impl ScrollControllerLeaf for TabBarScrollController
Source§fn scroll_controller_data(
self: Handle<Self>,
app: &App,
) -> &ScrollControllerData
fn scroll_controller_data( self: Handle<Self>, app: &App, ) -> &ScrollControllerData
Dart’s
ScrollController fields, held under the field scroll_controller
(scroll_controller_accessors!).Source§fn scroll_controller_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut ScrollControllerData
fn scroll_controller_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ScrollControllerData
Source§fn create_scroll_position(
self: Handle<Self>,
app: &mut App,
physics: ScrollPhysicsRef,
context: Rc<dyn ScrollContext>,
old_position: Option<AnyScrollPosition>,
) -> ScrollPositionRef
fn create_scroll_position( self: Handle<Self>, app: &mut App, physics: ScrollPhysicsRef, context: Rc<dyn ScrollContext>, old_position: Option<AnyScrollPosition>, ) -> ScrollPositionRef
Source§fn attach(
self: Handle<Self>,
app: &mut App,
position: Retained<AnyScrollPosition>,
)
fn attach( self: Handle<Self>, app: &mut App, position: Retained<AnyScrollPosition>, )
Register the given position with this controller. Read more
Source§fn detach(self: Handle<Self>, app: &mut App, position: AnyScrollPosition)
fn detach(self: Handle<Self>, app: &mut App, position: AnyScrollPosition)
Unregister the given position with this controller. Read more
Source§fn notification_listener(self: Handle<Self>) -> Listener
fn notification_listener(self: Handle<Self>) -> Listener
Dart’s
notifyListeners tear-off: the listener this controller keeps on each attached
position.Source§fn forward_notification(self: Handle<Self>, app: &mut App)
fn forward_notification(self: Handle<Self>, app: &mut App)
The body behind
notification_listener.Source§fn on_attach(
self: Handle<Self>,
app: &App,
) -> Option<Rc<dyn Fn(&mut App, AnyScrollPosition)>>
fn on_attach( self: Handle<Self>, app: &App, ) -> Option<Rc<dyn Fn(&mut App, AnyScrollPosition)>>
Source§fn on_detach(
self: Handle<Self>,
app: &App,
) -> Option<Rc<dyn Fn(&mut App, AnyScrollPosition)>>
fn on_detach( self: Handle<Self>, app: &App, ) -> Option<Rc<dyn Fn(&mut App, AnyScrollPosition)>>
Source§fn animate_to(
self: Handle<Self>,
app: &mut App,
offset: f64,
duration: Duration,
curve: Rc<dyn Curve>,
) -> CompleterFuture<()> ⓘ
fn animate_to( self: Handle<Self>, app: &mut App, offset: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ
Source§fn as_controller(self: Handle<Self>) -> AnyScrollController
fn as_controller(self: Handle<Self>) -> AnyScrollController
This controller as the erased
AnyScrollController — what to pass where a Dart API
takes a ScrollController.Auto Trait Implementations§
impl !RefUnwindSafe for TabBarScrollController
impl !Send for TabBarScrollController
impl !Sync for TabBarScrollController
impl !UnwindSafe for TabBarScrollController
impl Forget for TabBarScrollController
impl Freeze for TabBarScrollControllerwhere
*const u8 is !null: Freeze,
PhantomData<Option<Listener>>: Freeze,
*const RcInner<Cell<usize>> is !null: Freeze,
PhantomData<RcInner<Cell<usize>>>: Freeze,
*const RcInner<dyn Fn(&mut App, AnyScrollPosition)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, AnyScrollPosition)>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Retained<AnyScrollPosition>>: Freeze,
NonZero<u32>: Freeze,
PhantomData<fn() -> TabBarState>: Freeze,
impl Move for TabBarScrollController
impl Unpin for TabBarScrollController
impl UnsafeUnpin for TabBarScrollControllerwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Listener>>: UnsafeUnpin,
*const RcInner<Cell<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<usize>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, AnyScrollPosition)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, AnyScrollPosition)>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Retained<AnyScrollPosition>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> TabBarState>: 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