Skip to main content

TabPageSelector

Struct TabPageSelector 

Source
pub struct TabPageSelector {
    pub key: Option<KeyRef>,
    pub controller: Option<Ref<TabController>>,
    pub indicator_size: f64,
    pub color: Option<Color>,
    pub selected_color: Option<Color>,
    pub border_style: Option<BorderStyle>,
}
Expand description

Uses TabPageSelectorIndicator to display a row of small circular indicators, one per tab.

The selected tab’s indicator is highlighted. Often used in conjunction with a TabBarView.

If a TabController is not provided, then there must be a DefaultTabController ancestor.

Fields§

§key: Option<KeyRef>§controller: Option<Ref<TabController>>

This widget’s selection and animation state.

If TabController is not provided, then the value of DefaultTabController::of will be used.

§indicator_size: f64

The indicator circle’s diameter (the default value is 12.0).

§color: Option<Color>

The indicator circle’s fill color for unselected pages.

If this parameter is null, then the indicator is filled with Colors::TRANSPARENT.

§selected_color: Option<Color>

The indicator circle’s fill color for selected pages and border color for all indicator circles.

If this parameter is null, then the indicator is filled with the theme’s ColorScheme::secondary.

§border_style: Option<BorderStyle>

The indicator circle’s border style.

Defaults to BorderStyle::Solid if value is not specified.

Implementations§

Source§

impl TabPageSelector

Source

pub fn new() -> TabPageSelector

Creates a compact widget that indicates which tab has been selected; Dart’s named arguments are the setters.

Source

pub fn key(self, key: KeyRef) -> TabPageSelector

Dart TabPageSelector(key:).

Source

pub fn controller(self, controller: Ref<TabController>) -> TabPageSelector

Dart TabPageSelector(controller:).

Source

pub fn indicator_size(self, indicator_size: f64) -> TabPageSelector

Dart TabPageSelector(indicatorSize:).

Source

pub fn color(self, color: Color) -> TabPageSelector

Dart TabPageSelector(color:).

Source

pub fn selected_color(self, selected_color: Color) -> TabPageSelector

Dart TabPageSelector(selectedColor:).

Source

pub fn border_style(self, border_style: BorderStyle) -> TabPageSelector

Dart TabPageSelector(borderStyle:).

Trait Implementations§

Source§

impl Debug for TabPageSelector

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TabPageSelector

Source§

fn default() -> TabPageSelector

Returns the “default value” for a type. Read more
Source§

impl StatefulWidget for TabPageSelector

Source§

type State = TabPageSelectorState

The state this widget creates.
Source§

fn key(&self) -> Option<&KeyRef>

Source§

fn create_state(&self) -> TabPageSelectorState

Creates the mutable state for this widget at a given location in the tree. Read more
Source§

fn debug_fill_properties( &self, _app: &App, properties: &mut DiagnosticPropertiesBuilder, )

Dart’s debugFillProperties: the properties a dump shows for this widget, in Dart’s order. Dart’s Widget base only sets the dense tree style, which the framework does.
Source§

fn debug_check_constructor(&self)

Source§

fn as_preferred_size_widget( &self, ) -> Option<&(dyn PreferredSizeWidget + 'static)>

Source§

fn type_name(&self) -> &'static str

See Widget::type_name. A stateful form another widget kind becomes (an animated or status transition widget) names the widget it wraps.

Auto Trait Implementations§

§

impl !RefUnwindSafe for TabPageSelector

§

impl !Send for TabPageSelector

§

impl !Sync for TabPageSelector

§

impl !UnwindSafe for TabPageSelector

§

impl Forget for TabPageSelector

§

impl Freeze for TabPageSelector
where *const RcInner<dyn Key> is !null: Freeze, PhantomData<RcInner<dyn Key>>: Freeze, NonZero<u32>: Freeze, PhantomData<fn() -> TabController>: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze,

§

impl Move for TabPageSelector

§

impl Unpin for TabPageSelector
where Rc<dyn Key>: Unpin, NonZero<u32>: Unpin, Rc<Keep>: Unpin,

§

impl UnsafeUnpin for TabPageSelector
where *const RcInner<dyn Key> is !null: UnsafeUnpin, PhantomData<RcInner<dyn Key>>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, PhantomData<fn() -> TabController>: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin,

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<W> IntoWidget<StatefulKind> for W
where W: StatefulWidget,

Source§

fn into_widget(self) -> Rc<dyn Widget>

The widget as a tree node, made where this is called: its creation_location.
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>