Skip to main content

TabBarScrollController

Struct TabBarScrollController 

Source
pub struct TabBarScrollController { /* private fields */ }
Expand description

The ScrollController for a TabBar widget.

Implementations§

Source§

impl TabBarScrollController

Source

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

Creates a scroll controller for a TabBar, with Dart’s ScrollController defaults.

Source

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

Source§

fn change_notifier_data(&self) -> &ChangeNotifierData

Source§

fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData

Source§

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)

Runs after the listener is removed. Dart overrides of removeListener that work after super.removeListener go here.
Source§

impl ScrollControllerLeaf for TabBarScrollController

Source§

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

Source§

fn create_scroll_position( self: Handle<Self>, app: &mut App, physics: ScrollPhysicsRef, context: Rc<dyn ScrollContext>, old_position: Option<AnyScrollPosition>, ) -> ScrollPositionRef

Creates a [ScrollPosition] for use by a Scrollable widget. Read more
Source§

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

Discards any resources used by the object.
Source§

fn initial_scroll_offset(self: Handle<Self>, app: &App) -> f64

The initial value to use for offset. Read more
Source§

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)

Unregister the given position with this controller. Read more
Source§

fn debug_fill_description( self: Handle<Self>, app: &App, description: &mut Vec<String>, )

Add additional information to the given description for use by to_string. Read more
Source§

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)

The body behind notification_listener.
Source§

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

Source§

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)>>

Source§

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

Source§

fn positions(self: Handle<Self>, app: &App) -> Vec<AnyScrollPosition>

Source§

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

Source§

fn position(self: Handle<Self>, app: &App) -> AnyScrollPosition

Source§

fn offset(self: Handle<Self>, app: &App) -> f64

Source§

fn animate_to( self: Handle<Self>, app: &mut App, offset: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ

Source§

fn jump_to(self: Handle<Self>, app: &mut App, value: f64)

Source§

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

Source§

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 TabBarScrollController

§

impl Move for TabBarScrollController

§

impl Unpin for TabBarScrollController
where *const u8 is !null: Unpin, Rc<dyn Fn(&mut App)>: Unpin, NonZero<u32>: Unpin, *const (): Unpin, Rc<Cell<usize>>: Unpin, Rc<dyn Fn(&mut App, AnyScrollPosition)>: Unpin, &'static ScrollPositionVTable: Unpin, Rc<Keep>: Unpin,

§

impl UnsafeUnpin for TabBarScrollController

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> ListenableObject for T
where T: ChangeNotifier,

Source§

fn add_listener(self: Handle<T>, app: &mut App, listener: Listener)

Register a closure to be called when the object notifies its listeners.
Source§

fn remove_listener(self: Handle<T>, app: &mut App, listener: &Listener)

Remove a previously registered closure from the list of closures that the object notifies.
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>