Skip to main content

UnderlineTabIndicator

Struct UnderlineTabIndicator 

Source
pub struct UnderlineTabIndicator {
    pub border_radius: Option<BorderRadius>,
    pub border_side: BorderSide,
    pub insets: EdgeInsetsGeometry,
}
Expand description

Used with TabBar::indicator to draw a horizontal line below the selected tab.

The selected tab underline is inset from the tab’s boundary by insets. The border_side defines the line’s color and weight.

The TabBar::indicator_size property can be used to define the indicator’s bounds in terms of its (centered) widget with TabBarIndicatorSize::Label, or the entire tab with TabBarIndicatorSize::Tab.

Fields§

§border_radius: Option<BorderRadius>

The radius of the indicator’s corners.

If this value is non-null, rounded rectangular tab indicator is drawn, otherwise rectangular tab indicator is drawn.

§border_side: BorderSide

The color and weight of the horizontal line drawn below the selected tab.

§insets: EdgeInsetsGeometry

Locates the selected tab’s underline relative to the tab’s boundary.

The TabBar::indicator_size property can be used to define the tab indicator’s bounds in terms of its (centered) tab widget with TabBarIndicatorSize::Label, or the entire tab with TabBarIndicatorSize::Tab.

Implementations§

Source§

impl UnderlineTabIndicator

Source

pub fn new() -> UnderlineTabIndicator

Create an underline style selected tab indicator; Dart’s named arguments are the setters.

Source

pub fn border_radius(self, border_radius: BorderRadius) -> UnderlineTabIndicator

Dart UnderlineTabIndicator(borderRadius:).

Source

pub fn border_side(self, border_side: BorderSide) -> UnderlineTabIndicator

Dart UnderlineTabIndicator(borderSide:).

Source

pub fn insets( self, insets: impl Into<EdgeInsetsGeometry>, ) -> UnderlineTabIndicator

Dart UnderlineTabIndicator(insets:).

Trait Implementations§

Source§

impl Clone for UnderlineTabIndicator

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UnderlineTabIndicator

Source§

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

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

impl Decoration for UnderlineTabIndicator

Source§

fn lerp_from(&self, a: Option<&dyn Decoration>, t: f64) -> Option<DecorationRef>

Linearly interpolates from another Decoration (which may be of a different class) to this. Read more
Source§

fn lerp_to(&self, b: Option<&dyn Decoration>, t: f64) -> Option<DecorationRef>

Linearly interpolates from this to another Decoration (which may be of a different class).
Source§

fn create_box_painter( &self, on_changed: Option<VoidCallback>, ) -> Box<dyn BoxPainter>

Returns a BoxPainter that will paint this decoration.
Source§

fn get_clip_path(&self, rect: Rect, text_direction: TextDirection) -> Path

Returns a closed Path that describes the outer edge of this decoration. Read more
Source§

fn as_any(&self) -> &dyn Any

Downcast support for is / as in Dart.
Source§

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

Dart’s Decoration.debugFillProperties, inherited from Diagnosticable: a subclass adds its own properties and calls this first, as Dart’s super does.
Source§

fn diagnostics_node(&self, name: Option<String>) -> DiagnosticableNode

Dart’s Decoration.toDiagnosticsNode(name:), inherited from Diagnosticable; a dyn Decoration cannot name the Sized Diagnosticable, so the bridge lives here.
Source§

fn to_string_short(&self) -> String

Dart’s Decoration.toStringShort: the runtime type.
Source§

fn debug_assert_is_valid(&self) -> bool

In debug mode, panics if the object is not in a valid configuration. Otherwise, returns true.
Source§

fn padding(&self) -> EdgeInsetsGeometry

Returns the insets to apply when using this decoration on a box that has contents, so that the contents do not overlap the edges of the decoration.
Source§

fn is_complex(&self) -> bool

Whether this decoration is complex enough to benefit from caching its painting.
Source§

fn hit_test( &self, size: Size, position: Offset, text_direction: Option<TextDirection>, ) -> bool

Tests whether the given point, on a rectangle of a given size, would be considered to hit the decoration or not.
Source§

fn eq_decoration(&self, other: &(dyn Decoration + 'static)) -> bool

Field equality. Dart’s default == is identity; subclasses that override == implement this.
Source§

impl Default for UnderlineTabIndicator

Source§

fn default() -> UnderlineTabIndicator

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

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,